Add Qt-only autosave recovery fallback

Provide a small KAutoSaveFile-compatible implementation for the no-KF5 build path and use it to keep the existing crash-recovery code active when BUILD_WITH_KF5=OFF.

The normal KF5 build still uses the KDE KAutoSaveFile implementation.

Assisted-by: pi coding agent / Mika (OpenAI GPT-5.5)
This commit is contained in:
Gerhard Schwanzer
2026-07-05 13:16:19 +02:00
parent d0cea474a6
commit e6124e941a
8 changed files with 350 additions and 32 deletions
+1 -4
View File
@@ -47,6 +47,7 @@
#include <QProcessEnvironment>
#include <QRegularExpression>
#ifdef BUILD_WITHOUT_KF5
# include "ui/nokde/kautosavefile.h"
#else
# include <KAutoSaveFile>
#endif
@@ -2500,9 +2501,6 @@ void QETApp::buildSystemTrayMenu()
*/
void QETApp::checkBackupFiles()
{
#ifdef BUILD_WITHOUT_KF5
return;
#else
QList<KAutoSaveFile *> stale_files = KAutoSaveFile::allStaleFiles();
//Remove from the list @stale_files, the stales file of opened project
@@ -2577,7 +2575,6 @@ void QETApp::checkBackupFiles()
delete stale;
}
}
#endif
}
/**