mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-07 20:14:12 +02:00
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:
+1
-10
@@ -30,6 +30,7 @@
|
||||
#include "titleblockproperties.h"
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
# include "ui/nokde/kautosavefile.h"
|
||||
#else
|
||||
# include <KAutoSaveFile>
|
||||
#endif
|
||||
@@ -48,10 +49,6 @@ class XmlElementCollection;
|
||||
class QTimer;
|
||||
class TerminalStrip;
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
class KAutoSaveFile;
|
||||
#endif
|
||||
|
||||
/**
|
||||
This class represents a QET project. Typically saved as a .qet file, it
|
||||
@@ -79,10 +76,7 @@ class QETProject : public QObject
|
||||
public:
|
||||
QETProject (QObject *parent = nullptr);
|
||||
QETProject (const QString &path, QObject * = nullptr);
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
QETProject (KAutoSaveFile *backup, QObject *parent=nullptr);
|
||||
#endif
|
||||
~QETProject() override;
|
||||
|
||||
private:
|
||||
@@ -297,10 +291,7 @@ class QETProject : public QObject
|
||||
QTimer m_save_backup_timer,
|
||||
m_autosave_timer;
|
||||
QFuture<bool> m_backup_future;
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
KAutoSaveFile m_backup_file;
|
||||
#endif
|
||||
QUuid m_uuid = QUuid::createUuid();
|
||||
projectDataBase m_data_base;
|
||||
QVector<TerminalStrip *> m_terminal_strip_vector;
|
||||
|
||||
Reference in New Issue
Block a user