forked from qt-creator/qt-creator
Vcs: Extend vcsFullySynchronousExec to have flags
Change-Id: I4c4174d8a2b8989d59750c57dc6a0b5aae375670 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -389,10 +389,12 @@ bool VcsBaseClient::synchronousPush(const QString &workingDir,
|
|||||||
bool VcsBaseClient::vcsFullySynchronousExec(const QString &workingDir,
|
bool VcsBaseClient::vcsFullySynchronousExec(const QString &workingDir,
|
||||||
const QStringList &args,
|
const QStringList &args,
|
||||||
QByteArray *outputData,
|
QByteArray *outputData,
|
||||||
QByteArray *errorData) const
|
QByteArray *errorData,
|
||||||
|
unsigned flags) const
|
||||||
{
|
{
|
||||||
QByteArray internalErrorData;
|
QByteArray internalErrorData;
|
||||||
QScopedPointer<VcsCommand> command(createCommand(workingDir));
|
QScopedPointer<VcsCommand> command(createCommand(workingDir));
|
||||||
|
command->addFlags(flags);
|
||||||
bool result = command->runFullySynchronous(args, vcsTimeoutS(), outputData,
|
bool result = command->runFullySynchronous(args, vcsTimeoutS(), outputData,
|
||||||
errorData ? errorData : &internalErrorData);
|
errorData ? errorData : &internalErrorData);
|
||||||
if (!internalErrorData.isEmpty())
|
if (!internalErrorData.isEmpty())
|
||||||
|
@@ -222,7 +222,8 @@ protected:
|
|||||||
QString vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const;
|
QString vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const;
|
||||||
// Fully synchronous VCS execution (QProcess-based)
|
// Fully synchronous VCS execution (QProcess-based)
|
||||||
bool vcsFullySynchronousExec(const QString &workingDir, const QStringList &args,
|
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
|
// Synchronous VCS execution using Utils::SynchronousProcess, with
|
||||||
// log windows updating (using VcsBasePlugin::runVcs with flags)
|
// log windows updating (using VcsBasePlugin::runVcs with flags)
|
||||||
Utils::SynchronousProcessResponse vcsSynchronousExec(const QString &workingDir,
|
Utils::SynchronousProcessResponse vcsSynchronousExec(const QString &workingDir,
|
||||||
|
Reference in New Issue
Block a user