Commit b193990e authored by Marco Bubke's avatar Marco Bubke
Browse files

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