Items can be saved before starting the updater.

This commit is contained in:
2026-01-06 10:15:01 +01:00
parent 99ed398c2f
commit 8d4260b18d
2 changed files with 5 additions and 7 deletions

View File

@ -76,12 +76,10 @@ bool GenericCore::isApplicationUpdateAvailable() {
return true; return true;
} }
void GenericCore::triggerApplicationUpdate() { void GenericCore::triggerApplicationUpdate(const bool saveChanges) {
// TODO include cleaness of undo stack if (saveChanges && !m_modelUndoStack->isClean()) {
// if (!m_undoStack->isClean()) { saveItems();
// saveItems(); }
// }
// QStringList args("update componentA componentB");
QStringList args("--start-updater"); QStringList args("--start-updater");
QString toolFilePath = getMaintenanceToolFilePath(); QString toolFilePath = getMaintenanceToolFilePath();
QProcess::startDetached(toolFilePath, args); QProcess::startDetached(toolFilePath, args);

View File

@ -20,7 +20,7 @@ class GenericCore : public QObject {
void sayHello() const; void sayHello() const;
bool isApplicationUpdateAvailable(); bool isApplicationUpdateAvailable();
void triggerApplicationUpdate(); void triggerApplicationUpdate(const bool saveChanges);
QUndoStack* getModelUndoStack() const; QUndoStack* getModelUndoStack() const;
std::shared_ptr<TableModel> getModel() const; std::shared_ptr<TableModel> getModel() const;