forked from qt-creator/qt-creator
Introduce ExitCodeInterpreter, useful when exit code != 0 is valid
Task-number: QTCREATORBUG-10207 Change-Id: I3b440d40a968f09afc613b686ee50da6465ad88e Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -365,7 +365,8 @@ void VcsBaseClient::diff(const QString &workingDir, const QStringList &files,
|
||||
QStringList args;
|
||||
const QStringList paramArgs = paramWidget != 0 ? paramWidget->arguments() : QStringList();
|
||||
args << vcsCmdString << extraOptions << paramArgs << files;
|
||||
enqueueJob(createCommand(workingDir, editor), args);
|
||||
Command *command = createCommand(workingDir, editor);
|
||||
enqueueJob(command, args, exitCodeInterpreter(DiffCommand, command));
|
||||
}
|
||||
|
||||
void VcsBaseClient::log(const QString &workingDir, const QStringList &files,
|
||||
@@ -461,6 +462,13 @@ QString VcsBaseClient::vcsCommandString(VcsCommand cmd) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
Utils::ExitCodeInterpreter *VcsBaseClient::exitCodeInterpreter(VcsCommand cmd, QObject *parent) const
|
||||
{
|
||||
Q_UNUSED(cmd)
|
||||
Q_UNUSED(parent)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void VcsBaseClient::import(const QString &repositoryRoot, const QStringList &files,
|
||||
const QStringList &extraOptions)
|
||||
{
|
||||
@@ -605,9 +613,9 @@ Command *VcsBaseClient::createCommand(const QString &workingDirectory,
|
||||
return cmd;
|
||||
}
|
||||
|
||||
void VcsBaseClient::enqueueJob(Command *cmd, const QStringList &args)
|
||||
void VcsBaseClient::enqueueJob(Command *cmd, const QStringList &args, Utils::ExitCodeInterpreter *interpreter)
|
||||
{
|
||||
cmd->addJob(args);
|
||||
cmd->addJob(args, interpreter);
|
||||
cmd->execute();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user