QmlDesigner.qmlPuppet: allows specifying alternative to qmlpuppet

This allows the user to specify another qmlpuppet then the one
delivered with QtCreator. For example a pupper build with mingw.

The enviroment variable QTCREATOR_QMLPUPPET_PATH is used.

Reviewed-by: Kai Koehne
This commit is contained in:
Thomas Hartmann
2011-03-08 16:52:12 +01:00
parent bc0303e143
commit 386e204685

View File

@@ -95,6 +95,11 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
#endif #endif
applicationPath += "/qmlpuppet"; applicationPath += "/qmlpuppet";
QByteArray envImportPath = qgetenv("QTCREATOR_QMLPUPPET_PATH");
if (!envImportPath.isEmpty()) {
applicationPath = envImportPath;
}
m_qmlPuppetEditorProcess = new QProcess; m_qmlPuppetEditorProcess = new QProcess;
connect(m_qmlPuppetEditorProcess.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus))); connect(m_qmlPuppetEditorProcess.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), m_qmlPuppetEditorProcess.data(), SLOT(kill())); connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), m_qmlPuppetEditorProcess.data(), SLOT(kill()));