Merge pull request #902 from ispyisail/fix/901-crash-report-never-offered

Offer the crash report after the recovery prompt, not instead of it
This commit is contained in:
Laurent Trinques
2026-09-17 12:27:10 +02:00
committed by GitHub
2 changed files with 22 additions and 6 deletions
+20 -6
View File
@@ -2660,14 +2660,28 @@ void QETApp::checkBackupFiles()
}
}
if (stale_files.isEmpty()) {
// Only offer an unretrieved crash dump when there's no project
// to recover this run -- discussion #644 step 5 is explicit
// that the two prompts must never both show at once.
checkCrashDump();
return;
if (!stale_files.isEmpty()) {
offerBackupFiles(stale_files);
}
// Discussion #644 step 5 asks that the recovery prompt and the crash
// report never show at the same time -- not that the report be dropped
// whenever there is something to recover. Offering it here, once the
// recovery prompt has been answered, keeps the two sequential without
// losing the report after the most common crash there is: one with a
// project open, which always leaves a stale file behind, so the report
// was unreachable in exactly the case it is most wanted (issue #901).
checkCrashDump();
}
/**
@brief QETApp::offerBackupFiles
Ask whether to reopen the recovery files left by a previous run, and
open or discard them accordingly.
@param stale_files : the recovery files to offer
*/
void QETApp::offerBackupFiles(const QList<KAutoSaveFile *> &stale_files)
{
QString text;
if(stale_files.size() == 1) {
text.append(tr("<b>Le fichier de restauration suivant a été trouvé,<br>"
+2
View File
@@ -31,6 +31,7 @@ class QSplashScreen;
class QMenu;
class QAction;
class QMainWindow;
class KAutoSaveFile;
#define QETAPP_COMMON_TBT_PROTOCOL "commontbt"
#define QETAPP_COMPANY_TBT_PROTOCOL "companytbt"
@@ -290,6 +291,7 @@ class QETApp : public QObject
void initSystemTray();
void buildSystemTrayMenu();
void checkBackupFiles();
void offerBackupFiles(const QList<KAutoSaveFile *> &stale_files);
void checkCrashDump();
void fetchWindowStats(
const QList<QETDiagramEditor *> &,