From cea7a3f8ce85999196ef575b67fbf288a5c351bc Mon Sep 17 00:00:00 2001 From: Twinki Date: Fri, 17 May 2024 14:34:01 -0400 Subject: [PATCH 1/2] Add `displayGameName()` and `lootGameName()` to plugin-base # Modifications - Add `lootGameName()` which gives the plugin a tad bit more control over LOOT cli args - Add `displayGameName()` which will be used separate display-specific calls & more integral calls to `gameName()`, will also pave way for deeper plugin localization --- src/iplugingame.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/iplugingame.h b/src/iplugingame.h index 51dac4a8..09e03a00 100644 --- a/src/iplugingame.h +++ b/src/iplugingame.h @@ -81,6 +81,16 @@ class IPluginGame : public QObject, public IPlugin */ virtual QString gameName() const = 0; + /** + * used to override display-specific text in place of the gameName + * for example the text for the main window or the initial instance creation game plugin selection/list + * + * added for future translation purposes or to make plugins visually more accurate in the ui + * + * @return display-specific name of the game + */ + virtual QString displayGameName() const { return gameName(); } + template T* feature() const { @@ -257,6 +267,14 @@ class IPluginGame : public QObject, public IPlugin */ virtual QString gameShortName() const = 0; + /** + * @brief game name that's passed to the LOOT cli --game argument + * + * only applicable for games using LOOT based sorting + * defaults to gameShortName() + */ + virtual QString lootGameName() const { return gameShortName(); } + /** * @brief Get any primary alternative 'short' name for the game * From 180aba89d2bb7c4bedd52c74b4119732c7d26fa6 Mon Sep 17 00:00:00 2001 From: Twinki Date: Wed, 22 May 2024 17:08:06 -0400 Subject: [PATCH 2/2] clang-format --- src/iplugingame.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/iplugingame.h b/src/iplugingame.h index 09e03a00..df5de5b4 100644 --- a/src/iplugingame.h +++ b/src/iplugingame.h @@ -83,10 +83,12 @@ class IPluginGame : public QObject, public IPlugin /** * used to override display-specific text in place of the gameName - * for example the text for the main window or the initial instance creation game plugin selection/list - * - * added for future translation purposes or to make plugins visually more accurate in the ui - * + * for example the text for the main window or the initial instance creation game + * plugin selection/list + * + * added for future translation purposes or to make plugins visually more accurate in + * the ui + * * @return display-specific name of the game */ virtual QString displayGameName() const { return gameName(); } @@ -269,7 +271,7 @@ class IPluginGame : public QObject, public IPlugin /** * @brief game name that's passed to the LOOT cli --game argument - * + * * only applicable for games using LOOT based sorting * defaults to gameShortName() */