From fafdb146004401355db5245cc1f7c241c00cf991 Mon Sep 17 00:00:00 2001
From: isanae <14251494+isanae@users.noreply.github.com>
Date: Fri, 7 Jun 2019 19:26:54 -0400
Subject: fixed EditExecutablesDialog being opened without a parent removed
Executable's constructor with values, replaced with default ctor + setters,
all these strings were much too error-prone added Executable ctor overload to
convert from ExecutableInfo plugin executables now override most of the
custom changes renamed browseButton to browseBinaryButton to avoid confusion
with the other browseDirButton fixed both browse dialogs not handling cancel
EditExecutablesDialog's list used to change the text color for custom
executables, replaced with italics
---
src/executableslist.h | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
(limited to 'src/executableslist.h')
diff --git a/src/executableslist.h b/src/executableslist.h
index e35cb550..54a105d0 100644
--- a/src/executableslist.h
+++ b/src/executableslist.h
@@ -27,7 +27,7 @@ along with Mod Organizer. If not, see .
#include
#include
-namespace MOBase { class IPluginGame; }
+namespace MOBase { class IPluginGame; class ExecutableInfo; }
/*!
* @brief Information about an executable
@@ -44,9 +44,12 @@ public:
Q_DECLARE_FLAGS(Flags, Flag);
- Executable(
- QString title, QFileInfo binaryInfo, QString arguments,
- QString steamAppID, QString workingDirectory, Flags flags);
+ Executable() = default;
+
+ /**
+ * @brief Executable from plugin
+ */
+ Executable(const MOBase::ExecutableInfo& info, Flags flags);
const QString& title() const;
const QFileInfo& binaryInfo() const;
@@ -55,6 +58,13 @@ public:
const QString& workingDirectory() const;
Flags flags() const;
+ Executable& title(const QString& s);
+ Executable& binaryInfo(const QFileInfo& fi);
+ Executable& arguments(const QString& s);
+ Executable& steamAppID(const QString& s);
+ Executable& workingDirectory(const QString& s);
+ Executable& flags(Flags f);
+
bool isCustom() const;
bool isShownOnToolbar() const;
void setShownOnToolbar(bool state);
--
cgit v1.3.1