From ea685651a1af4ae4d4beee8f6fcf273c9a7c32bf Mon Sep 17 00:00:00 2001 From: Alexia Date: Mon, 28 Mar 2016 16:45:52 -0400 Subject: [PATCH] NOISSUE Quick fix for icons being required --- logic/BaseInstance.cpp | 5 ++++- logic/Env.cpp | 5 +++++ logic/Env.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp index 53e4ca6bd..f8530c9d0 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 4214695da..c9093e77b 100644 --- a/logic/Env.cpp +++ b/logic/Env.cpp @@ -49,6 +49,11 @@ std::shared_ptr 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 e3c5130a7..806fa106a 100644 --- a/logic/Env.h +++ b/logic/Env.h @@ -34,6 +34,8 @@ public: std::shared_ptr icons(); + bool hasIcons(); + /// init the cache. FIXME: possible future hook point void initHttpMetaCache();