From 9a014db4b3a64dc93450dff8afe980db3694c595 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 25 May 2019 02:12:11 -0400 Subject: moved GetFileExecutionContext() out of OrganizerCore, no reason for it to be there added ExploreFile(), changed all mentions of ShellExecute() in MainWindow to use it --- src/organizercore.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/organizercore.h') diff --git a/src/organizercore.h b/src/organizercore.h index 94cfa5ae..103443eb 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -56,12 +56,21 @@ namespace MOBase { class IPluginGame; } + enum class FileExecutionTypes { executable = 1, other = 2 }; +bool GetFileExecutionContext( + QWidget* parent, const QFileInfo &targetInfo, + QFileInfo &binaryInfo, QString &arguments, FileExecutionTypes& type); + +bool ExploreFile(const QString& path); +bool ExploreFile(const QFileInfo& info); +bool ExploreFile(const QDir& dir); + class OrganizerCore : public QObject, public MOBase::IPluginDiagnose { @@ -147,10 +156,6 @@ 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 = "", -- cgit v1.3.1