Add better logging for file open and write errors
This commit is contained in:
@@ -122,6 +122,9 @@ ContextSettingsPage::ContextSettingsPage(SettingsDialog *dialog, QWidget *parent
|
||||
ui_->preview_normal->setText(text);
|
||||
file.close();
|
||||
}
|
||||
else {
|
||||
qLog(Error) << "Could not open" << file.fileName() << "for reading:" << file.errorString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void MoodbarSettingsPage::InitMoodbarPreviews() {
|
||||
// Read the sample data
|
||||
QFile file(":/mood/sample.mood");
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qLog(Warning) << "Unable to open moodbar sample file";
|
||||
qLog(Warning) << "Failed to open moodbar sample file" << file.fileName() << "for reading:" << file.errorString();
|
||||
return;
|
||||
}
|
||||
QByteArray file_data = file.readAll();
|
||||
|
||||
Reference in New Issue
Block a user