summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2014-08-05 12:28:10 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2014-08-05 14:00:25 +0200
commitb2ac3fd90ccfc21cf4c5bce353d8e08208961eeb (patch)
treece6713560b80131c60a9943b704cb6bb964bc0e6
parent31df04c5ae389e6468914a0b40dea4fe0b40d7d1 (diff)
downloadqt-creator-b2ac3fd90ccfc21cf4c5bce353d8e08208961eeb.tar.gz
QmlDesigner.PuppetCreator: Set qmlpuppet dir as working dir
Before the working directory was the working directory of Qt Creator. If the working direcotry was the bin diredtory of Qt Creator the puppet picked up the qt.conf from Qt Creator and could not load the platform plugin. Change-Id: Iab22267c578fc837b1b52bded850f0033618811c Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp5
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetcreator.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
index 48249a07ba..fa98d5c97b 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
@@ -132,7 +132,10 @@ QProcess *PuppetCreator::createPuppetProcess(PuppetCreator::QmlPuppetVersion pup
else
puppetPath = qml2PuppetPath(m_availablePuppetType);
+ const QString workingDirectory = qmlPuppetDirectory(m_availablePuppetType);
+
return puppetProcess(puppetPath,
+ workingDirectory,
puppetMode,
socketToken,
handlerObject,
@@ -142,6 +145,7 @@ QProcess *PuppetCreator::createPuppetProcess(PuppetCreator::QmlPuppetVersion pup
QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
+ const QString &workingDirectory,
const QString &puppetMode,
const QString &socketToken,
QObject *handlerObject,
@@ -158,6 +162,7 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
puppetProcess->setProcessChannelMode(QProcess::MergedChannels);
QObject::connect(puppetProcess, SIGNAL(readyRead()), handlerObject, outputSlot);
}
+ puppetProcess->setWorkingDirectory(workingDirectory);
puppetProcess->start(puppetPath, QStringList() << socketToken << puppetMode << "-graphicssystem raster");
if (!qgetenv("DEBUG_QML_PUPPET").isEmpty())
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.h b/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
index 31bc499c43..4c9b8c337b 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
+++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.h
@@ -94,6 +94,7 @@ protected:
bool qtIsSupported() const;
static bool checkPuppetVersion(const QString &qmlPuppetPath);
QProcess *puppetProcess(const QString &puppetPath,
+ const QString &workingDirectory,
const QString &puppetMode,
const QString &socketToken,
QObject *handlerObject,