From 26786da96d37914ca91eff633de751acf1a3b9d8 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 7 Jun 2019 18:04:31 -0400 Subject: moved store/load to ExecutablesList --- src/executableslist.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/executableslist.h') diff --git a/src/executableslist.h b/src/executableslist.h index b8e4cf77..136f70bf 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -103,9 +103,14 @@ public: bool empty() const; /** - * @brief add the executables preconfigured for this game - **/ - void addFromPlugin(MOBase::IPluginGame const *game); + * @brief initializes the list from the settings and the given plugin + */ + void load(const MOBase::IPluginGame* game, QSettings& settings); + + /** + * @brief writes the current list to the settings + */ + void store(QSettings& settings); /** * @brief get an executable by name @@ -195,14 +200,16 @@ public: void remove(const QString &title); private: + std::vector m_Executables; + void addExecutableInternal(const QString &title, const QString &executableName, const QString &arguments, const QString &workingDirectory, const QString &steamAppID); -private: - - std::vector m_Executables; - + /** + * @brief add the executables preconfigured for this game + **/ + void addFromPlugin(MOBase::IPluginGame const *game); }; Q_DECLARE_OPERATORS_FOR_FLAGS(Executable::Flags) -- cgit v1.3.1