summaryrefslogtreecommitdiff
path: root/src/executableslist.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-06-07 18:24:41 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-06-15 14:40:39 -0400
commit617a6005451aba1d45f13228f13f1cc150a78bb4 (patch)
tree865a38cea724ba1bb969639d69177677924440c8 /src/executableslist.h
parent26786da96d37914ca91eff633de751acf1a3b9d8 (diff)
ExecutablesList:
- merged addExecutable(), updateExecutable() and addExecutableInternal() into a new setExecutable() - setExecutable() adds the executable to the list if not found, or forwards to Executable::mergeFrom() - mergeFrom() handles merging from/to plugin executables
Diffstat (limited to 'src/executableslist.h')
-rw-r--r--src/executableslist.h48
1 files changed, 7 insertions, 41 deletions
diff --git a/src/executableslist.h b/src/executableslist.h
index 136f70bf..4965dbf9 100644
--- a/src/executableslist.h
+++ b/src/executableslist.h
@@ -73,6 +73,8 @@ public:
void setShownOnToolbar(bool state);
bool usesOwnIcon() const;
+ void mergeFrom(const Executable& other);
+
private:
QString m_title;
QFileInfo m_binaryInfo;
@@ -155,57 +157,21 @@ public:
* @brief add a new executable to the list
* @param executable
*/
- void addExecutable(const Executable &executable);
-
- /**
- * @brief add a new executable to the list
- *
- * @param title name displayed in the UI
- * @param executableName the actual filename to execute
- * @param arguments arguments to pass to the executable
- **/
- void addExecutable(const QString &title,
- const QString &executableName,
- const QString &arguments,
- const QString &workingDirectory,
- const QString &steamAppID,
- Executable::Flags flags)
- {
- updateExecutable(title, executableName, arguments, workingDirectory,
- steamAppID, Executable::AllFlags, flags);
- }
-
- /**
- * @brief Update an executable to the list
- *
- * @param title name displayed in the UI
- * @param executableName the actual filename to execute
- * @param arguments arguments to pass to the executable
- * @param closeMO if true, MO will be closed when the binary is started
- **/
- void updateExecutable(const QString &title,
- const QString &executableName,
- const QString &arguments,
- const QString &workingDirectory,
- const QString &steamAppID,
- Executable::Flags mask,
- Executable::Flags flags);
+ void setExecutable(const Executable &executable);
/**
- * @brief remove the executable with the specified file name. This needs to be an absolute file path
+ * @brief remove the executable with the specified file name. This needs to
+ * be an absolute file path
*
* @param title title of the executable to remove
- * @note if the executable name is invalid, nothing happens. There is no way to determine if this was successful
+ * @note if the executable name is invalid, nothing happens. There is no way
+ * to determine if this was successful
**/
void remove(const QString &title);
private:
std::vector<Executable> m_Executables;
- void addExecutableInternal(const QString &title, const QString &executableName, const QString &arguments,
- const QString &workingDirectory,
- const QString &steamAppID);
-
/**
* @brief add the executables preconfigured for this game
**/