From 88c386d74d7d94ec16d4d84ed674eb51e31647ac Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 9 Jun 2024 12:18:17 +0200 Subject: Refactoring of game features for better management. (#2043) --- src/pluginlist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pluginlist.cpp') 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(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature(); 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(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature(); 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(); + auto gamePlugins = m_Organizer.gameFeatures().gameFeature(); 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() && esp.hasLightExtension && - !m_GamePlugin->feature()->lightPluginsAreSupported()) { + auto feature = m_Organizer.gameFeatures().gameFeature(); + if (feature && esp.hasLightExtension && feature->lightPluginsAreSupported()) { toolTip += "

" + tr("Light plugins (ESL) are not supported by this game."); } else { toolTip += "

" + tr("This game does not currently permit custom plugin " -- cgit v1.3.1