From 5c4a025d75192c4a90a92ccfc530947fe662785f Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 10 Apr 2015 15:38:39 +0200 Subject: [PATCH] Vcs: Extend vcsFullySynchronousExec to have flags Change-Id: I4c4174d8a2b8989d59750c57dc6a0b5aae375670 Reviewed-by: Orgad Shaneh --- src/plugins/vcsbase/vcsbaseclient.cpp | 4 +++- src/plugins/vcsbase/vcsbaseclient.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 042037475c6..2f3dd975c4b 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -389,10 +389,12 @@ bool VcsBaseClient::synchronousPush(const QString &workingDir, bool VcsBaseClient::vcsFullySynchronousExec(const QString &workingDir, const QStringList &args, QByteArray *outputData, - QByteArray *errorData) const + QByteArray *errorData, + unsigned flags) const { QByteArray internalErrorData; QScopedPointer command(createCommand(workingDir)); + command->addFlags(flags); bool result = command->runFullySynchronous(args, vcsTimeoutS(), outputData, errorData ? errorData : &internalErrorData); if (!internalErrorData.isEmpty()) diff --git a/src/plugins/vcsbase/vcsbaseclient.h b/src/plugins/vcsbase/vcsbaseclient.h index 91d812db4d2..4947a9f5312 100644 --- a/src/plugins/vcsbase/vcsbaseclient.h +++ b/src/plugins/vcsbase/vcsbaseclient.h @@ -222,7 +222,8 @@ protected: QString vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const; // Fully synchronous VCS execution (QProcess-based) bool vcsFullySynchronousExec(const QString &workingDir, const QStringList &args, - QByteArray *outputData, QByteArray *errorData = 0) const; + QByteArray *outputData, QByteArray *errorData = 0, + unsigned flags = 0) const; // Synchronous VCS execution using Utils::SynchronousProcess, with // log windows updating (using VcsBasePlugin::runVcs with flags) Utils::SynchronousProcessResponse vcsSynchronousExec(const QString &workingDir,