summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorAlexia <alexia@robotbrain.info>2016-03-28 16:45:52 -0400
committerAlexia <alexia@robotbrain.info>2016-03-28 16:45:52 -0400
commitea685651a1af4ae4d4beee8f6fcf273c9a7c32bf (patch)
tree978c10940fec7b628123e9328d822f07a8f842c9 /logic
parent53b4bd019fe6b34559da1ce9c92533c9f79301ac (diff)
downloadMultiMC-ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf.tar
MultiMC-ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf.tar.gz
MultiMC-ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf.tar.lz
MultiMC-ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf.tar.xz
MultiMC-ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf.zip
NOISSUE Quick fix for icons being required
Diffstat (limited to 'logic')
-rw-r--r--logic/BaseInstance.cpp5
-rw-r--r--logic/Env.cpp5
-rw-r--r--logic/Env.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index 53e4ca6b..f8530c9d 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -35,7 +35,10 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
m_settings->registerSetting("name", "Unnamed Instance");
m_settings->registerSetting("iconKey", "default");
- connect(ENV.icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
+ if (ENV.hasIcons())
+ {
+ connect(ENV.icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
+ }
m_settings->registerSetting("notes", "");
m_settings->registerSetting("lastLaunchTime", 0);
m_settings->registerSetting("totalTimePlayed", 0);
diff --git a/logic/Env.cpp b/logic/Env.cpp
index 4214695d..c9093e77 100644
--- a/logic/Env.cpp
+++ b/logic/Env.cpp
@@ -49,6 +49,11 @@ std::shared_ptr<IconList> Env::icons()
Q_ASSERT(m_icons != nullptr);
return m_icons;
}
+
+bool Env::hasIcons()
+{
+ return m_icons != nullptr;
+}
/*
class NullVersion : public BaseVersion
{
diff --git a/logic/Env.h b/logic/Env.h
index e3c5130a..806fa106 100644
--- a/logic/Env.h
+++ b/logic/Env.h
@@ -34,6 +34,8 @@ public:
std::shared_ptr<IconList> icons();
+ bool hasIcons();
+
/// init the cache. FIXME: possible future hook point
void initHttpMetaCache();