extragear/sdk/kdevelop/languages/cpp

Milian Wolff mail at milianw.de
Mon Apr 5 00:44:04 UTC 2010


SVN commit 1111176 by mwolff:

merge make runs for different possible targets, should make parsing of some custom make file projects already 3x faster

since I have no clue about unsermake, I don't know whether it works there as well, anyone?

CCMAIL: kdevelop-devel at barney.cs.uni-potsdam.de
CCBUG: 215968

 M  +6 -12     includepathresolver.cpp  


--- trunk/extragear/sdk/kdevelop/languages/cpp/includepathresolver.cpp #1111175:1111176
@@ -653,18 +653,15 @@
   ///STEP 3.1: Try resolution using the absolute path
   PathResolutionResult res;
   //Try for each possible target
-  for( QStringList::const_iterator it = possibleTargets.constBegin(); it != possibleTargets.constEnd(); ++it ) {
-    res = resolveIncludePathInternal( absoluteFile, wd, *it, source );
-    if( res ) {
-      break;
-    } else {
-      ifTest( cout << "Try for possible target " << (*it).toLocal8Bit().data() << " failed: " << res.longErrorMessage.toLocal8Bit().data() << endl; )
-    }
+  res = resolveIncludePathInternal( absoluteFile, wd, possibleTargets.join(" "), source );
+  if (!res) {
+    ifTest( cout << "Try for absolute file " << absoluteFile.toLocal8Bit().data() << " and targets " << possibleTargets.join(", ").toLocal8Bit().data()
+                 << " failed: " << res.longErrorMessage.toLocal8Bit().data() << endl; )
   }
   
   res.includePathDependency = dependency;
   
-  if( res ) {
+  if( !res.paths.isEmpty() ) {
     res.addPathsUnique(resultOnFail);
     QMutexLocker l( &m_cacheMutex );
     CacheEntry ce;
@@ -678,10 +675,7 @@
 
   ///STEP 3.2: Try resolution using the relative path
   QString relativeFile = KUrl::relativePath(wd, absoluteFile);
-  for( QStringList::const_iterator it = possibleTargets.constBegin(); it != possibleTargets.constEnd(); ++it ) {
-    res = resolveIncludePathInternal( relativeFile, wd, *it, source );
-    if( res ) break;
-  }
+  res = resolveIncludePathInternal( relativeFile, wd, possibleTargets.join(" "), source );
   
   res.includePathDependency = dependency;
 




More information about the KDevelop-devel mailing list