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
-6
View File
@@ -44,10 +44,7 @@ class ElementsCollectionWidget;
class AutoNumberingDockWidget;
class TerminalNumberingDialog;
#ifdef BUILD_WITHOUT_KF5
#else
class KAutoSaveFile;
#endif
/**
This class represents the main window of the QElectroTech diagram editor and,
ipso facto, the most important part of the QElectroTech user interface.
@@ -72,10 +69,7 @@ class QETDiagramEditor : public QETMainWindow
ProjectView *currentProjectView() const;
QETProject *currentProject() const;
bool drawGrid() const;
#ifdef BUILD_WITHOUT_KF5
#else
void openBackupFiles (QList<KAutoSaveFile *> backup_files);
#endif
protected:
bool event(QEvent *) override;