From 1b4350f193a7e651b97478febdba8bf76636ce61 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 18 Jun 2013 11:23:40 +0200 Subject: executeoperation forward error output to qwarning - with that we can see something in the verbose output Change-Id: Ic427cfb93d04c1a4f6e3bc8d8355c5d6f49a8c3d Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich --- src/libs/installer/elevatedexecuteoperation.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)); } } -- cgit v1.2.3