OSDN Git Service

Fix that searchInPath("exe") would try /exe
authordt <qtc-committer@nokia.com>
Mon, 26 Apr 2010 14:33:18 +0000 (16:33 +0200)
committerdt <qtc-committer@nokia.com>
Fri, 30 Apr 2010 09:55:03 +0000 (11:55 +0200)
src/plugins/projectexplorer/environment.cpp

index 326200a..1a2d69c 100644 (file)
@@ -196,7 +196,7 @@ QString Environment::searchInPath(QString executable) const
 #endif
     const QChar slash = QLatin1Char('/');
     foreach (const QString &p, path()) {
-//        qDebug()<<"trying"<<path + '/' + executable;
+//        qDebug()<<"trying"<<p + '/' + executable;
         QString fp = p;
         fp += slash;
         fp += executable;
@@ -216,7 +216,7 @@ QStringList Environment::path() const
 #else
     const QChar sep = QLatin1Char(':');
 #endif
-    return m_values.value(QLatin1String("PATH")).split(sep);
+    return m_values.value(QLatin1String("PATH")).split(sep, QString::SkipEmptyParts);
 }
 
 QString Environment::value(const QString &key) const