Commit b2ac3fd9 authored by Thomas Hartmann's avatar Thomas Hartmann

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: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 31df04c5
......@@ -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())
......
......@@ -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,
......
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