forked from qt-creator/qt-creator
VcsBase: Move RunFlags into separate header
It is going to be used outside of VcsCommand, too. Use RunFlags enum as an argument to several functions instead of unsigned. Change-Id: I355c80a845a9b5982108fbde3412754392dce702 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "vcsbase_global.h"
|
||||
#include "vcsenums.h"
|
||||
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/processenums.h>
|
||||
@@ -81,21 +82,6 @@ class VCSBASE_EXPORT VcsCommand final : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// Convenience to synchronously run commands
|
||||
enum RunFlags {
|
||||
ShowStdOut = 0x1, // Show standard output.
|
||||
MergeOutputChannels = 0x2, // see QProcess: Merge stderr/stdout.
|
||||
SuppressStdErr = 0x4, // Suppress standard error output.
|
||||
SuppressFailMessage = 0x8, // No message about command failure.
|
||||
SuppressCommandLogging = 0x10, // No command log entry.
|
||||
ShowSuccessMessage = 0x20, // Show message about successful completion of command.
|
||||
ForceCLocale = 0x40, // Force C-locale for commands whose output is parsed.
|
||||
SilentOutput = 0x80, // Suppress user notifications about the output happening.
|
||||
UseEventLoop = 0x100, // Use event loop when executed in UI thread.
|
||||
ExpectRepoChanges = 0x200, // Expect changes in repository by the command
|
||||
NoOutput = SuppressStdErr | SuppressFailMessage | SuppressCommandLogging
|
||||
};
|
||||
|
||||
VcsCommand(const Utils::FilePath &workingDirectory, const Utils::Environment &environment);
|
||||
~VcsCommand() override;
|
||||
|
||||
@@ -106,7 +92,7 @@ public:
|
||||
const Utils::ExitCodeInterpreter &interpreter = {});
|
||||
void start();
|
||||
|
||||
void addFlags(unsigned f);
|
||||
void addFlags(RunFlags f);
|
||||
|
||||
void setCodec(QTextCodec *codec);
|
||||
|
||||
@@ -115,7 +101,7 @@ public:
|
||||
|
||||
static CommandResult runBlocking(const Utils::FilePath &workingDirectory,
|
||||
const Utils::Environment &environmentconst,
|
||||
const Utils::CommandLine &command, unsigned flags,
|
||||
const Utils::CommandLine &command, RunFlags flags,
|
||||
int timeoutS, QTextCodec *codec);
|
||||
void cancel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user