From 6a8bb3691b9e30bcb90003eead34b287010cf17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 2 May 2017 01:43:18 +0200 Subject: 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. --- application/MultiMC.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'application/MultiMC.h') diff --git a/application/MultiMC.h b/application/MultiMC.h index 28a9641a..48be3b22 100644 --- a/application/MultiMC.h +++ b/application/MultiMC.h @@ -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; -- cgit v1.2.3