Commit d4816850 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Return QByteArray in synchronousShow



Will be used by Grep

Change-Id: I9346707eef2fe55085b0edf090e117fe45afe8bf
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 71166d06
......@@ -1814,7 +1814,7 @@ SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory) const
}
bool GitClient::synchronousShow(const QString &workingDirectory, const QString &id,
QString *output, QString *errorMessage) const
QByteArray *output, QString *errorMessage) const
{
if (!canShow(id)) {
*errorMessage = msgCannotShow(id);
......@@ -1822,12 +1822,9 @@ bool GitClient::synchronousShow(const QString &workingDirectory, const QString &
}
QStringList args(QLatin1String("show"));
args << QLatin1String(decorateOption) << QLatin1String(noColorOption) << id;
QByteArray outputText;
QByteArray errorText;
const bool rc = vcsFullySynchronousExec(workingDirectory, args, &outputText, &errorText);
if (rc)
*output = commandOutputFromLocal8Bit(outputText);
else
const bool rc = vcsFullySynchronousExec(workingDirectory, args, output, &errorText);
if (!rc)
msgCannotRun(QStringList(QLatin1String("show")), workingDirectory, errorText, errorMessage);
return rc;
}
......
......@@ -226,7 +226,7 @@ public:
QString *errorMessage = 0) const;
SubmoduleDataMap submoduleList(const QString &workingDirectory) const;
bool synchronousShow(const QString &workingDirectory, const QString &id,
QString *output, QString *errorMessage) const;
QByteArray *output, QString *errorMessage) const;
bool synchronousRevListCmd(const QString &workingDirectory, const QStringList &arguments,
QString *output, QString *errorMessage = 0) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment