summaryrefslogtreecommitdiffstats
path: root/application/MultiMC.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-05-02 01:43:18 +0200
committerPetr Mrázek <peterix@gmail.com>2017-05-02 01:43:18 +0200
commit6a8bb3691b9e30bcb90003eead34b287010cf17f (patch)
treeafe9068330e2c1971355938b2fef7d93c172a47c /application/MultiMC.h
parent0132fd99291e359aae4af184c5f57ace21bf9863 (diff)
downloadMultiMC-6a8bb3691b9e30bcb90003eead34b287010cf17f.tar
MultiMC-6a8bb3691b9e30bcb90003eead34b287010cf17f.tar.gz
MultiMC-6a8bb3691b9e30bcb90003eead34b287010cf17f.tar.lz
MultiMC-6a8bb3691b9e30bcb90003eead34b287010cf17f.tar.xz
MultiMC-6a8bb3691b9e30bcb90003eead34b287010cf17f.zip
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.
Diffstat (limited to 'application/MultiMC.h')
-rw-r--r--application/MultiMC.h10
1 files changed, 10 insertions, 0 deletions
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);
@@ -187,6 +192,11 @@ private:
void showFatalErrorMessage(const QString & title, const QString & content);
private:
+ void addRunningInstance();
+ void subRunningInstance();
+ bool shouldExitNow() const;
+
+private:
QDateTime startTime;
std::shared_ptr<SettingsObject> m_settings;