back ported some qt6 recent file handling.

This commit is contained in:
2025-03-30 18:14:04 +02:00
parent c3b4c7c3b1
commit 5648757389
3 changed files with 27 additions and 32 deletions

View File

@ -1558,7 +1558,7 @@ void PTextEdit::fileClose(const bool check)
int result = QMessageBox::warning(this, "**WARNING**",
"Do you really want to close this file.\nChanges will be lost",
"Close", "Cancel");
if (result == 1) // Cancel
if (result == QMessageBox::Cancel) // Cancel
return;
}
@ -1588,7 +1588,7 @@ void PTextEdit::fileCloseAll()
int result = QMessageBox::warning(this, "**WARNING**",
"Do you really want to close all files.\nChanges of unsaved files will be lost",
"Close", "Cancel");
if (result == 1) // Cancel
if (result == QMessageBox::Cancel) // Cancel
return;
break;
}
@ -1625,7 +1625,7 @@ void PTextEdit::fileCloseAllOthers()
int result = QMessageBox::warning(this, "**WARNING**",
"Do you really want to close all files.\nChanges of unsaved files will be lost",
"Close", "Cancel");
if (result == 1) // Cancel
if (result == QMessageBox::Cancel) // Cancel
return;
break;
}
@ -1668,12 +1668,14 @@ void PTextEdit::fileExit()
int result = QMessageBox::warning(this, "**WARNING**",
"Do you really want to exit from the applcation.\nChanges will be lost",
"Exit", "Cancel");
if (result == 1) // Cancel
if (result == QMessageBox::Cancel) // Cancel
return;
break;
}
}
fAdmin->saveRecentFiles();
qApp->quit();
}