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:
parent
4afa8935aa
commit
cba86b4b28
1 changed files with 5 additions and 1 deletions
6
mayu.cpp
6
mayu.cpp
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue