diff options
author | Tim Jenssen <tim.jenssen@digia.com> | 2013-06-18 11:23:40 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2013-06-18 13:18:44 +0200 |
commit | 1b4350f193a7e651b97478febdba8bf76636ce61 (patch) | |
tree | 28d199753a572d961f6b671d60a34a3572f75521 | |
parent | 4fd8e6315778e1e0351ef074a4b0d75fcddf4942 (diff) |
executeoperation forward error output to qwarning
- with that we can see something in the verbose output
Change-Id: Ic427cfb93d04c1a4f6e3bc8d8355c5d6f49a8c3d
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
-rw-r--r-- | src/libs/installer/elevatedexecuteoperation.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index 2e1d050a2..d797f2077 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -232,6 +232,12 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments) } else { q->setErrorString(customErrorMessage); } + + QByteArray standardErrorOutput = process->readAllStandardError(); + // in error case it would be useful to see something in verbose output + if (!standardErrorOutput.isEmpty()) + qWarning() << standardErrorOutput; + returnValue = false; } @@ -260,7 +266,10 @@ void ElevatedExecuteOperation::Private::readProcessOutput() } const QByteArray output = process->readAll(); if (!output.isEmpty()) { - qDebug() << output; + if (q->error() == UserDefinedError) + qWarning() << output; + else + qDebug() << output; emit q->outputTextChanged(QString::fromLocal8Bit(output)); } } |