NOISSUE Quick fix for icons being required

This commit is contained in:
Alexia 2016-03-28 16:45:52 -04:00
parent 53b4bd019f
commit ea685651a1
3 changed files with 11 additions and 1 deletions

View File

@ -35,7 +35,10 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
m_settings->registerSetting("name", "Unnamed Instance"); m_settings->registerSetting("name", "Unnamed Instance");
m_settings->registerSetting("iconKey", "default"); 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("notes", "");
m_settings->registerSetting("lastLaunchTime", 0); m_settings->registerSetting("lastLaunchTime", 0);
m_settings->registerSetting("totalTimePlayed", 0); m_settings->registerSetting("totalTimePlayed", 0);

View File

@ -49,6 +49,11 @@ std::shared_ptr<IconList> Env::icons()
Q_ASSERT(m_icons != nullptr); Q_ASSERT(m_icons != nullptr);
return m_icons; return m_icons;
} }
bool Env::hasIcons()
{
return m_icons != nullptr;
}
/* /*
class NullVersion : public BaseVersion class NullVersion : public BaseVersion
{ {

View File

@ -34,6 +34,8 @@ public:
std::shared_ptr<IconList> icons(); std::shared_ptr<IconList> icons();
bool hasIcons();
/// init the cache. FIXME: possible future hook point /// init the cache. FIXME: possible future hook point
void initHttpMetaCache(); void initHttpMetaCache();