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:
Jarek Kobus
2022-10-05 19:08:53 +02:00
parent 3811236903
commit eec0679234
20 changed files with 196 additions and 159 deletions

View File

@@ -4,6 +4,7 @@
#pragma once
#include "vcsbase_global.h"
#include "vcsenums.h"
#include "vcsbaseclientsettings.h"
@@ -77,10 +78,11 @@ public:
// Fully synchronous VCS execution (QProcess-based)
CommandResult vcsSynchronousExec(const Utils::FilePath &workingDir,
const QStringList &args, unsigned flags = 0,
const QStringList &args, RunFlags flags = RunFlags::None,
int timeoutS = -1, QTextCodec *codec = nullptr) const;
CommandResult vcsSynchronousExec(const Utils::FilePath &workingDir,
const Utils::CommandLine &cmdLine, unsigned flags = 0,
const Utils::CommandLine &cmdLine,
RunFlags flags = RunFlags::None,
int timeoutS = -1, QTextCodec *codec = nullptr) const;
// Simple helper to execute a single command using createCommand and enqueueJob.
@@ -88,7 +90,7 @@ public:
const QStringList &arguments,
VcsBaseEditorWidget *editor = nullptr,
bool useOutputToWindow = false,
unsigned additionalFlags = 0) const;
RunFlags additionalFlags = RunFlags::None) const;
protected:
void resetCachedVcsInfo(const Utils::FilePath &workingDir);