From 821f95b8ab259f89f379c10e533c42476c56d361 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 13 Aug 2015 22:37:33 +0100 Subject: Clean up of fixes for custom executable window --- src/executableslist.h | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'src/executableslist.h') diff --git a/src/executableslist.h b/src/executableslist.h index b8e2afe6..37e903e5 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -42,7 +42,9 @@ struct Executable { enum Flag { CustomExecutable = 0x01, ShowInToolbar = 0x02, - UseApplicationIcon = 0x04 + UseApplicationIcon = 0x04, + + AllFlags = 0xff //I know, I know }; Q_DECLARE_FLAGS(Flags, Flag) @@ -127,36 +129,40 @@ public: void addExecutable(const Executable &executable); /** - * @brief update an existing executable or add a new one to the list + * @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 * @param closeMO if true, MO will be closed when the binary is started **/ - void updateOrAddExecutable(const QString &title, - const QString &executableName, - const QString &arguments, - const QString &workingDirectory, - MOBase::ExecutableInfo::CloseMOStyle closeMO, - const QString &steamAppID, - bool usesApplicationIcon); + void addExecutable(const QString &title, + const QString &executableName, + const QString &arguments, + const QString &workingDirectory, + MOBase::ExecutableInfo::CloseMOStyle closeMO, + const QString &steamAppID, + Executable::Flags flags) + { + updateExecutable(title, executableName, arguments, workingDirectory, closeMO, steamAppID, Executable::AllFlags, flags); + } /** - * @brief U[date executable list with configured settings + * @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 configureExecutable(const QString &title, - const QString &executableName, - const QString &arguments, - const QString &workingDirectory, - MOBase::ExecutableInfo::CloseMOStyle closeMO, - const QString &steamAppID, - Executable::Flags flags); + void updateExecutable(const QString &title, + const QString &executableName, + const QString &arguments, + const QString &workingDirectory, + MOBase::ExecutableInfo::CloseMOStyle closeMO, + const QString &steamAppID, + Executable::Flags mask, + Executable::Flags flags); /** * @brief remove the executable with the specified file name. This needs to be an absolute file path -- cgit v1.3.1