From f5330efd0d2692eb14738d8ccbe4e269ce165b46 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 25 May 2019 01:05:15 -0400 Subject: a copy of getBinaryExecuteInfo() and openDataFile() was in both mainwindow and modinfodialog, it's now moved to organizercore and renamed getFileExecutionContext() and executefile() getFileExecutionContext() is also changed to return an enum instead of a 0-1-2 int --- src/organizercore.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/organizercore.h') diff --git a/src/organizercore.h b/src/organizercore.h index bfb72529..94cfa5ae 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -56,6 +56,13 @@ namespace MOBase { class IPluginGame; } +enum class FileExecutionTypes +{ + executable = 1, + other = 2 +}; + + class OrganizerCore : public QObject, public MOBase::IPluginDiagnose { @@ -140,6 +147,12 @@ public: void doAfterLogin(const std::function &function) { m_PostLoginTasks.append(function); } + static bool getFileExecutionContext( + QWidget* parent, const QFileInfo &targetInfo, + QFileInfo &binaryInfo, QString &arguments, FileExecutionTypes& type); + + bool executeFile(QWidget* parent, const QFileInfo& targetInfo); + void spawnBinary(const QFileInfo &binary, const QString &arguments = "", const QDir ¤tDirectory = QDir(), const QString &steamAppID = "", -- cgit v1.3.1