Commit b193990e authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Refactor puppet path composing

Change-Id: If0a98544a365fe72e3fa89a9d7c85d8a5101434b
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent e5c51f44
......@@ -117,6 +117,15 @@ static bool hasQtQuick2(NodeInstanceView *nodeInstanceView)
return false;
}
QString NodeInstanceServerProxy::creatorQmlPuppetPath()
{
QString applicationPath = QCoreApplication::applicationDirPath();
applicationPath = macOSBundlePath(applicationPath);
applicationPath += QLatin1Char('/') + qmlPuppetApplicationName();
return applicationPath;
}
NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceView, RunModus runModus, const QString &pathToQt)
: NodeInstanceServerInterface(nodeInstanceView),
m_localServer(new QLocalServer(this)),
......@@ -148,9 +157,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
#ifdef QT_NO_DEBUG // to prevent of choosing the wrong puppet in debug
if (!QFileInfo(applicationPath).exists()) { //No qmlpuppet in Qt
//We have to find out how to give not too intrusive feedback
applicationPath = QCoreApplication::applicationDirPath();
applicationPath = macOSBundlePath(applicationPath);
applicationPath += QLatin1Char('/') + qmlPuppetApplicationName();
applicationPath = creatorQmlPuppetPath();
}
#endif
}
......
......@@ -78,7 +78,7 @@ protected:
QString missingQmlPuppetErrorMessage(const QString &applicationPath) const;
QString qmlPuppetApplicationName() const;
QString macOSBundlePath(const QString &path) const;
QString creatorQmlPuppetPath();
signals:
void processCrashed();
......
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