diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2024-06-09 12:18:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-09 12:18:17 +0200 |
| commit | 88c386d74d7d94ec16d4d84ed674eb51e31647ac (patch) | |
| tree | adf0b2537f12d11d8df77f68a84926d15b063554 /src/pluginlist.cpp | |
| parent | c43535f5bcf1043c3b9c00c77967267cf1acf60f (diff) | |
Refactoring of game features for better management. (#2043)
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index b1fd9757..748ffbad 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -177,7 +177,7 @@ void PluginList::refresh(const QString& profileName, QStringList primaryPlugins = m_GamePlugin->primaryPlugins(); QStringList enabledPlugins = m_GamePlugin->enabledPlugins(); - GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature<GamePlugins>(); const bool lightPluginsAreSupported = gamePlugins ? gamePlugins->lightPluginsAreSupported() : false; const bool overridePluginsAreSupported = @@ -673,7 +673,7 @@ void PluginList::writeLockedOrder(const QString& fileName) const void PluginList::saveTo(const QString& lockedOrderFileName) const { - GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature<GamePlugins>(); if (gamePlugins) { gamePlugins->writePluginLists(m_Organizer.managedGameOrganizer()->pluginList()); } @@ -1085,7 +1085,7 @@ void PluginList::generatePluginIndexes() int numESLs = 0; int numSkipped = 0; - GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature<GamePlugins>(); const bool lightPluginsSupported = gamePlugins ? gamePlugins->lightPluginsAreSupported() : false; const bool overridePluginsSupported = @@ -1358,8 +1358,8 @@ QVariant PluginList::tooltipData(const QModelIndex& modelIndex) const } if (esp.forceDisabled) { - if (m_GamePlugin->feature<GamePlugins>() && esp.hasLightExtension && - !m_GamePlugin->feature<GamePlugins>()->lightPluginsAreSupported()) { + auto feature = m_Organizer.gameFeatures().gameFeature<GamePlugins>(); + if (feature && esp.hasLightExtension && feature->lightPluginsAreSupported()) { toolTip += "<br><br>" + tr("Light plugins (ESL) are not supported by this game."); } else { toolTip += "<br><br>" + tr("This game does not currently permit custom plugin " |
