prune feature search paths which don't actually exist
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 17 Apr 2012 12:30:15 +0000 (14:30 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Wed, 27 Jun 2012 07:39:50 +0000 (09:39 +0200)
this should significantly cut down the time wasted looking for files in
non-existing directories, in particular on windows.

Change-Id: I7ab3523fe8c028e3787ebc78e4543ab04f53448e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
qmake/project.cpp

index 53f8d54..92c0782 100644 (file)
@@ -627,7 +627,12 @@ QStringList qmake_feature_paths(QMakeProperty *prop, bool host_build)
                                                     QLibraryInfo::EffectivePaths) +
                           mkspecs_concat + (*concat_it));
     feature_roots.removeDuplicates();
-    return feature_roots;
+
+    QStringList ret;
+    foreach (const QString &root, feature_roots)
+        if (QFileInfo(root).exists())
+            ret << root;
+    return ret;
 }
 
 QStringList qmake_mkspec_paths()