1
0
Fork 0
mirror of https://gitlab.com/Syping/mayu synced 2024-11-22 12:00:23 +01:00

better error messages for file ops

This commit is contained in:
Syping 2018-05-09 23:15:35 +02:00
parent 4afa8935aa
commit cba86b4b28

View file

@ -239,10 +239,14 @@ void mayu::work()
if (jsonFile.open(QSaveFile::WriteOnly)) {
jsonFile.write(jsonArray);
if (!jsonFile.commit()) {
qCritical() << "Failed save result to" << p_jsonFile;
qCritical() << "Failed save result to" << p_jsonFile << "because file can't be saved!";
p_return = 1;
}
}
else {
qCritical() << "Failed save result to" << p_jsonFile << "because file can't be opened!";
p_return = 1;
}
if (!regainPrivileges()) {
p_return = 3;
return;