Items can be saved before starting the updater.
This commit is contained in:
@ -76,12 +76,10 @@ bool GenericCore::isApplicationUpdateAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void GenericCore::triggerApplicationUpdate() {
|
||||
// TODO include cleaness of undo stack
|
||||
// if (!m_undoStack->isClean()) {
|
||||
// saveItems();
|
||||
// }
|
||||
// QStringList args("update componentA componentB");
|
||||
void GenericCore::triggerApplicationUpdate(const bool saveChanges) {
|
||||
if (saveChanges && !m_modelUndoStack->isClean()) {
|
||||
saveItems();
|
||||
}
|
||||
QStringList args("--start-updater");
|
||||
QString toolFilePath = getMaintenanceToolFilePath();
|
||||
QProcess::startDetached(toolFilePath, args);
|
||||
|
||||
@ -20,7 +20,7 @@ class GenericCore : public QObject {
|
||||
void sayHello() const;
|
||||
|
||||
bool isApplicationUpdateAvailable();
|
||||
void triggerApplicationUpdate();
|
||||
void triggerApplicationUpdate(const bool saveChanges);
|
||||
|
||||
QUndoStack* getModelUndoStack() const;
|
||||
std::shared_ptr<TableModel> getModel() const;
|
||||
|
||||
Reference in New Issue
Block a user