diff options
author | Andrew <forkk@forkk.net> | 2013-02-25 16:36:27 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-02-25 16:36:27 -0600 |
commit | bd64cda6726e088ebc860c3fc3ee220ed00121bd (patch) | |
tree | 135a1784cf2b7910dd7e258f52129b31a4f4244e /plugins | |
parent | 4ca35a760dfc53fd69f0f2030868ebeda250ed59 (diff) | |
download | MultiMC-bd64cda6726e088ebc860c3fc3ee220ed00121bd.tar MultiMC-bd64cda6726e088ebc860c3fc3ee220ed00121bd.tar.gz MultiMC-bd64cda6726e088ebc860c3fc3ee220ed00121bd.tar.lz MultiMC-bd64cda6726e088ebc860c3fc3ee220ed00121bd.tar.xz MultiMC-bd64cda6726e088ebc860c3fc3ee220ed00121bd.zip |
Added instance setting overrides.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/stdinstance/stdinstance.cpp | 3 | ||||
-rw-r--r-- | plugins/stdinstance/stdinstance.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/stdinstance/stdinstance.cpp b/plugins/stdinstance/stdinstance.cpp index 12d86bbc..217514a3 100644 --- a/plugins/stdinstance/stdinstance.cpp +++ b/plugins/stdinstance/stdinstance.cpp @@ -17,11 +17,14 @@ #include <QFileInfo> +#include <setting.h> + #include <javautils.h> StdInstance::StdInstance(const QString &rootDir, QObject *parent) : Instance(rootDir, parent) { + settings().registerSetting(new Setting("lastVersionUpdate", 0)); } diff --git a/plugins/stdinstance/stdinstance.h b/plugins/stdinstance/stdinstance.h index d812a9b0..d657d9aa 100644 --- a/plugins/stdinstance/stdinstance.h +++ b/plugins/stdinstance/stdinstance.h @@ -29,8 +29,8 @@ public: virtual void updateCurrentVersion(bool keepCurrent); ////// TIMESTAMPS ////// - virtual qint64 lastVersionUpdate() { return getField("lastVersionUpdate", 0).value<qint64>(); } - virtual void setLastVersionUpdate(qint64 val) { setField("lastVersionUpdate", val); } + virtual qint64 lastVersionUpdate() { return settings().get("lastVersionUpdate").value<qint64>(); } + virtual void setLastVersionUpdate(qint64 val) { settings().set("lastVersionUpdate", val); } }; #endif // STDINSTANCE_H |