GH-1874 do not allow updating while an instance is running

This is a nasty hack. Proper solution will require moving all
update related functionality out of the main window.

Running instances and updating should be mutually exclusive.
This commit is contained in:
Petr Mrázek
2017-05-02 01:43:18 +02:00
parent 0132fd9929
commit 6a8bb3691b
4 changed files with 72 additions and 7 deletions

View File

@ -151,6 +151,11 @@ public:
return m_runningInstances;
}
bool updatesAreAllowed();
signals:
void updateAllowedChanged(bool status);
public slots:
bool launch(InstancePtr instance, bool online = true, BaseProfilerFactory *profiler = nullptr);
bool kill(InstancePtr instance);
@ -186,6 +191,11 @@ private:
// sets the fatal error message and m_status to Failed.
void showFatalErrorMessage(const QString & title, const QString & content);
private:
void addRunningInstance();
void subRunningInstance();
bool shouldExitNow() const;
private:
QDateTime startTime;