[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/customproject
From:       Harald Fernengel <harry () kdevelop ! org>
Date:       2003-03-12 0:49:50
[Download RAW message or body]

CVS commit by harald: 

build on KDE 3.0.x, Falk, can you test? (don't have 3.0.x in reach at the moment)

Geiseri: why not use the following (get rid of the temporary QStringList)

m_targets += str.simplifyWhiteSpace().section(' ', 0, 0).replace(':', "");

sorry, 2 o'clock in the morning, so I won't touch any existing code :) (my version is commented out.)

n8


  M +4 -2      customprojectpart.cpp   1.27


--- kdevelop/parts/customproject/customprojectpart.cpp  #1.26:1.27
@@ -471,5 +471,5 @@ void CustomProjectPart::updateTargetMenu
         QTextStream stream(&f);
         //QRegExp re(".PHONY\\s*:(.*)");
-        QRegExp re("^[^($%.#].*[^)\\s][:].*$");
+        static QRegExp re("^[^($%.#].*[^)\\s][:].*$");
         QString str = "";
         while (!stream.atEnd()) {
@@ -485,7 +485,9 @@ void CustomProjectPart::updateTargetMenu
                 kdDebug(9025) << "Adding target: " << str.simplifyWhiteSpace() << endl;
 #if KDE_VERSION > 305
+                // m_targets += str.simplifyWhiteSpace().section(' ', 0, 0).replace(':', "");
                 m_targets += QStringList::split(" ", str.simplifyWhiteSpace())[0].replace(':', "");
 #else
-                //FIXME
+                static QRegExp colre(":");
+                m_targets += QStringList::split(" ", str.simplifyWhiteSpace())[0].replace(colre, "");
 #endif
             }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic