Add better logging for file open and write errors

This commit is contained in:
Jonas Kvinge
2021-08-09 23:32:26 +02:00
parent 7d61d8e646
commit f1d3cadb3b
15 changed files with 120 additions and 41 deletions

View File

@@ -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();