summaryrefslogtreecommitdiff
path: root/src/processrunner.h
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:03 +0200
committerGitHub <noreply@github.com>2023-07-09 17:36:03 +0200
commitef94aee28464039672b277243a0181ae93550d6c (patch)
tree0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/processrunner.h
parent7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff)
parent3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff)
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/processrunner.h')
-rw-r--r--src/processrunner.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/processrunner.h b/src/processrunner.h
index b8c8935c..c5b6bbe9 100644
--- a/src/processrunner.h
+++ b/src/processrunner.h
@@ -1,9 +1,9 @@
#ifndef PROCESSRUNNER_H
#define PROCESSRUNNER_H
+#include "envmodule.h"
#include "spawn.h"
#include "uilocker.h"
-#include "envmodule.h"
#include <executableinfo.h>
class OrganizerCore;
@@ -37,10 +37,10 @@ public:
enum WaitFlag
{
- NoFlags = 0x00,
+ NoFlags = 0x00,
// the directory structure will be refreshed once the process has completed
- TriggerRefresh = 0x01,
+ TriggerRefresh = 0x01,
// the process will be waited for even if locking is disabled or the
// process is not hooked
@@ -65,26 +65,26 @@ public:
ForCommandLine = TriggerRefresh | WaitForRefresh | ForceWait
};
- using WaitFlags = QFlags<WaitFlag>;
+ using WaitFlags = QFlags<WaitFlag>;
using ForcedLibraries = QList<MOBase::ExecutableForcedLoadSetting>;
ProcessRunner(OrganizerCore& core, IUserInterface* ui);
// move only
- ProcessRunner(ProcessRunner&&) = default;
+ ProcessRunner(ProcessRunner&&) = default;
ProcessRunner& operator=(const ProcessRunner&) = delete;
- ProcessRunner(const ProcessRunner&) = delete;
- ProcessRunner& operator=(ProcessRunner&&) = delete;
+ ProcessRunner(const ProcessRunner&) = delete;
+ ProcessRunner& operator=(ProcessRunner&&) = delete;
- ProcessRunner& setBinary(const QFileInfo &binary);
+ ProcessRunner& setBinary(const QFileInfo& binary);
ProcessRunner& setArguments(const QString& arguments);
ProcessRunner& setCurrentDirectory(const QDir& directory);
ProcessRunner& setSteamID(const QString& steamID);
ProcessRunner& setCustomOverwrite(const QString& customOverwrite);
ProcessRunner& setForcedLibraries(const ForcedLibraries& forcedLibraries);
ProcessRunner& setProfileName(const QString& profileName);
- ProcessRunner& setWaitForCompletion(
- WaitFlags flags=NoFlags, UILocker::Reasons reason=UILocker::LockUI);
+ ProcessRunner& setWaitForCompletion(WaitFlags flags = NoFlags,
+ UILocker::Reasons reason = UILocker::LockUI);
ProcessRunner& setHooked(bool b);
// - if the target is an executable file, runs it hooked
@@ -113,13 +113,12 @@ public:
// if the executable is not found in the list, the binary is run solely
// based on the parameters given
//
- ProcessRunner& setFromFileOrExecutable(
- const QString &executable,
- const QStringList &args,
- const QString &cwd={},
- const QString &profile={},
- const QString &forcedCustomOverwrite={},
- bool ignoreCustomOverwrite=false);
+ ProcessRunner& setFromFileOrExecutable(const QString& executable,
+ const QStringList& args,
+ const QString& cwd = {},
+ const QString& profile = {},
+ const QString& forcedCustomOverwrite = {},
+ bool ignoreCustomOverwrite = false);
// spawns the process and waits for it if required
//
@@ -172,7 +171,6 @@ private:
env::HandlePtr m_handle;
DWORD m_exitCode;
-
bool shouldRunShell() const;
bool shouldRefresh(Results r) const;
@@ -190,9 +188,9 @@ private:
// creates the lock widget and calls f()
//
- void withLock(std::function<void (UILocker::Session&)> f);
+ void withLock(std::function<void(UILocker::Session&)> f);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(ProcessRunner::WaitFlags);
-#endif // PROCESSRUNNER_H
+#endif // PROCESSRUNNER_H