Items can be saved before starting the updater.
This commit is contained in:
@ -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);
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user