diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-22 01:25:34 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-22 01:25:34 +0200 |
commit | e60a652b78af8f985862da726898291f807ae058 (patch) | |
tree | 6f4f998c7b5853b1ab8156b6004a657350a468bb /logic/BaseInstance.cpp | |
parent | 9ba1cd15e7f902cae705ff22451e4f76ad0d71ab (diff) | |
download | MultiMC-e60a652b78af8f985862da726898291f807ae058.tar MultiMC-e60a652b78af8f985862da726898291f807ae058.tar.gz MultiMC-e60a652b78af8f985862da726898291f807ae058.tar.lz MultiMC-e60a652b78af8f985862da726898291f807ae058.tar.xz MultiMC-e60a652b78af8f985862da726898291f807ae058.zip |
GH-1217 reset time played on zip pack import
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r-- | logic/BaseInstance.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp index b0235b47..02284d37 100644 --- a/logic/BaseInstance.cpp +++ b/logic/BaseInstance.cpp @@ -108,7 +108,7 @@ void BaseInstance::setRunning(bool running) m_isRunning = running; } -int64_t BaseInstance::totalTimePlayed() +int64_t BaseInstance::totalTimePlayed() const { qint64 current = settings()->get("totalTimePlayed").toLongLong(); if(m_isRunning) @@ -119,6 +119,11 @@ int64_t BaseInstance::totalTimePlayed() return current; } +void BaseInstance::resetTimePlayed() +{ + settings()->reset("totalTimePlayed"); +} + QString BaseInstance::instanceType() const { return m_settings->get("InstanceType").toString(); |