summaryrefslogtreecommitdiffstats
path: root/src/libs/installer
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2013-05-29 16:51:45 +0200
committerTim Jenssen <tim.jenssen@digia.com>2013-05-29 16:58:21 +0200
commitd1f768846d484ef1a1787e56c563985973ec4bdb (patch)
tree3fffb478713e54692d2b4ffc41bf5271068ca0b4 /src/libs/installer
parent362122658f2779ce938e02639cdc97e578ed9022 (diff)
add errorString to execute operation error output
Change-Id: Ieb1db289f50188107204e0a1e42ccb51f512229e Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer')
-rw-r--r--src/libs/installer/elevatedexecuteoperation.cpp3
-rw-r--r--src/libs/installer/fsengineserver.cpp2
-rw-r--r--src/libs/installer/qprocesswrapper.cpp8
-rw-r--r--src/libs/installer/qprocesswrapper.h1
4 files changed, 13 insertions, 1 deletions
diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp
index 04ca8bb91..2e1d050a2 100644
--- a/src/libs/installer/elevatedexecuteoperation.cpp
+++ b/src/libs/installer/elevatedexecuteoperation.cpp
@@ -204,7 +204,8 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments)
if (!success) {
q->setError(UserDefinedError);
//TODO: pass errorString() through the wrapper */
- q->setErrorString(tr("Execution failed: Could not start: \"%1\"").arg(callstr));
+ q->setErrorString(tr("Execution failed: Could not start: \"%1\"(%2)").arg(callstr,
+ process->errorString()));
returnValue = false;
}
diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp
index ae8fc0346..b17e1ae0a 100644
--- a/src/libs/installer/fsengineserver.cpp
+++ b/src/libs/installer/fsengineserver.cpp
@@ -448,6 +448,8 @@ QByteArray FSEngineConnectionThread::handleCommand(const QString &command)
returnStream << process->waitForStarted(msecs);
} else if (command == QLatin1String("QProcess::workingDirectory")) {
returnStream << process->workingDirectory();
+ } else if (command == QLatin1String("QProcess::errorString")) {
+ returnStream << process->errorString();
} else if (command == QLatin1String("QProcess::write")) {
QByteArray byteArray;
receivedStream >> byteArray;
diff --git a/src/libs/installer/qprocesswrapper.cpp b/src/libs/installer/qprocesswrapper.cpp
index fab9bd83d..416ca9f4c 100644
--- a/src/libs/installer/qprocesswrapper.cpp
+++ b/src/libs/installer/qprocesswrapper.cpp
@@ -392,6 +392,14 @@ QString QProcessWrapper::workingDirectory() const
return static_cast<QString>(d->process.workingDirectory());
}
+QString QProcessWrapper::errorString() const
+{
+ const Private::TimerBlocker blocker(this);
+ if (d->createSocket())
+ return callRemoteMethod<QString>(d->stream, QLatin1String("QProcess::errorString"));
+ return static_cast<QString>(d->process.errorString());
+}
+
void QProcessWrapper::setEnvironment(const QStringList &param1)
{
const Private::TimerBlocker blocker(this);
diff --git a/src/libs/installer/qprocesswrapper.h b/src/libs/installer/qprocesswrapper.h
index c566c3f07..15e6f1fba 100644
--- a/src/libs/installer/qprocesswrapper.h
+++ b/src/libs/installer/qprocesswrapper.h
@@ -100,6 +100,7 @@ public:
bool waitForFinished(int msecs = 30000);
void setEnvironment(const QStringList &environment);
QString workingDirectory() const;
+ QString errorString() const;
qint64 write(const QByteArray &byteArray);
QProcessWrapper::ProcessChannel readChannel() const;
void setReadChannel(QProcessWrapper::ProcessChannel channel);