From 2e36b9a34a00f0050d2c2db7b98efb5f3fd94f07 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Tue, 12 Jan 2010 10:38:23 +0100
Subject: [PATCH] Make sure that the qmlviewer from the binary package is
 always used

The custom creator-qml installer comes with a qmlviewer installed
in creator/bin. Make sure that this qmlviewer is used to run .qmlproject
files, even though there might be other qmlviewer binaries in the
PATH.
---
 src/plugins/qmlprojectmanager/qmlproject.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index 5bd88c8bdde..edfb45a9859 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -308,11 +308,11 @@ QmlRunConfiguration::QmlRunConfiguration(QmlProject *pro)
 {
     setDisplayName(tr("QML Viewer"));
 
-    // append creator/bin dir to search path (only useful for special creator-qml package)
-    const QString searchPath = QString(qgetenv("PATH"))
+    // prepend creator/bin dir to search path (only useful for special creator-qml package)
+    const QString searchPath = QCoreApplication::applicationDirPath()
                                + Utils::SynchronousProcess::pathSeparator()
-                               + QCoreApplication::applicationDirPath()
-;
+                               + QString(qgetenv("PATH"));
+
     m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, QLatin1String("qmlviewer"));
 }
 
-- 
GitLab