summaryrefslogtreecommitdiffstats
path: root/logic/ftb
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-22 01:06:45 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-22 01:06:45 +0200
commit9ba1cd15e7f902cae705ff22451e4f76ad0d71ab (patch)
treeaafc4d87d81489d3e8ab782c8b7922c44f1ea192 /logic/ftb
parentb10761711234b69cf8509bacb055f7d5c3c021e8 (diff)
downloadMultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar
MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.gz
MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.lz
MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.xz
MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.zip
GH-1217 add simple instance play time tracking
Not reliable in the face of crashes... but what is?
Diffstat (limited to 'logic/ftb')
-rw-r--r--logic/ftb/LegacyFTBInstance.cpp14
-rw-r--r--logic/ftb/LegacyFTBInstance.h2
-rw-r--r--logic/ftb/OneSixFTBInstance.cpp12
-rw-r--r--logic/ftb/OneSixFTBInstance.h4
4 files changed, 12 insertions, 20 deletions
diff --git a/logic/ftb/LegacyFTBInstance.cpp b/logic/ftb/LegacyFTBInstance.cpp
index e7490679..a7091f1d 100644
--- a/logic/ftb/LegacyFTBInstance.cpp
+++ b/logic/ftb/LegacyFTBInstance.cpp
@@ -7,15 +7,6 @@ LegacyFTBInstance::LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsO
{
}
-QString LegacyFTBInstance::getStatusbarDescription()
-{
- if (flags() & VersionBrokenFlag)
- {
- return "Legacy FTB: " + intendedVersionId() + " (broken)";
- }
- return "Legacy FTB: " + intendedVersionId();
-}
-
QString LegacyFTBInstance::id() const
{
return "FTB/" + BaseInstance::id();
@@ -29,3 +20,8 @@ void LegacyFTBInstance::copy(const QDir &newDir)
QString inst_type = settings_obj.get("InstanceType").toString();
settings_obj.set("InstanceType", "Legacy");
}
+
+QString LegacyFTBInstance::typeName() const
+{
+ return tr("Legacy FTB");
+}
diff --git a/logic/ftb/LegacyFTBInstance.h b/logic/ftb/LegacyFTBInstance.h
index 3bacf653..c878dcc6 100644
--- a/logic/ftb/LegacyFTBInstance.h
+++ b/logic/ftb/LegacyFTBInstance.h
@@ -7,7 +7,7 @@ class LegacyFTBInstance : public LegacyInstance
Q_OBJECT
public:
explicit LegacyFTBInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
- virtual QString getStatusbarDescription();
virtual QString id() const;
virtual void copy(const QDir &newDir);
+ virtual QString typeName() const;
};
diff --git a/logic/ftb/OneSixFTBInstance.cpp b/logic/ftb/OneSixFTBInstance.cpp
index 7cce1f48..1fc5b49b 100644
--- a/logic/ftb/OneSixFTBInstance.cpp
+++ b/logic/ftb/OneSixFTBInstance.cpp
@@ -125,18 +125,14 @@ void OneSixFTBInstance::createProfile()
m_version.reset(new MinecraftProfile(new FTBProfileStrategy(this)));
}
-QString OneSixFTBInstance::getStatusbarDescription()
+std::shared_ptr<Task> OneSixFTBInstance::createUpdateTask()
{
- if (flags() & VersionBrokenFlag)
- {
- return "OneSix FTB: " + intendedVersionId() + " (broken)";
- }
- return "OneSix FTB: " + intendedVersionId();
+ return OneSixInstance::createUpdateTask();
}
-std::shared_ptr<Task> OneSixFTBInstance::createUpdateTask()
+QString OneSixFTBInstance::typeName() const
{
- return OneSixInstance::createUpdateTask();
+ return tr("OneSix FTB");
}
#include "OneSixFTBInstance.moc"
diff --git a/logic/ftb/OneSixFTBInstance.h b/logic/ftb/OneSixFTBInstance.h
index 564f275d..c53a2ed8 100644
--- a/logic/ftb/OneSixFTBInstance.h
+++ b/logic/ftb/OneSixFTBInstance.h
@@ -15,8 +15,6 @@ public:
virtual void createProfile();
- virtual QString getStatusbarDescription();
-
virtual std::shared_ptr<Task> createUpdateTask() override;
virtual QString id() const;
@@ -24,6 +22,8 @@ public:
QDir librariesPath() const override;
QDir versionsPath() const override;
bool providesVersionFile() const override;
+ virtual QString typeName() const;
+
private:
SettingsObjectPtr m_globalSettings;
};