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

List:       kde-commits
Subject:    branches/kdevelop/3.4/buildtools/qmake
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-02-28 23:50:30
Message-ID: 1172706630.189631.32181.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 638154 by apaku:

Stupid me didn't do enough escaping on the regexps. 


 M  +5 -5      scope.cpp  


--- branches/kdevelop/3.4/buildtools/qmake/scope.cpp #638153:638154
@@ -719,7 +719,7 @@
                 origValues.append(" ");
             QString newval = *it;
             QRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)");
-            newval.replace(re, "\1$(\\2)\\3");
+            newval.replace(re, "\\1$(\\2)\\3");
             if( (newval).contains(" ") || (newval).contains("\t") || \
(newval).contains( getLineEndingString() ) || (newval).contains("#") )  \
origValues.append( "\""+newval+"\"" );  else
@@ -740,7 +740,7 @@
             || origValues.last() == getLineEndingString()
             || origValues.last().stripWhiteSpace() == "" ) && !origValues.isEmpty() \
)  origValues.pop_back();
-    if( !origValues.isEmpty() && origValues.last().find( QRegExp("\\[ \t]*#") ) != \
-1 ) +    if( !origValues.isEmpty() && origValues.last().find( QRegExp("\\\\[ \t]*#") \
                ) != -1 )
         origValues[origValues.count()-1] = \
                origValues[origValues.count()-1].mid(origValues[origValues.count()-1].find( \
                "#") );
     if( !origValues.isEmpty() && origValues.last().find( getLineEndingString() ) == \
-1 )  origValues.append(getLineEndingString());
@@ -1226,7 +1226,7 @@
     QMap<QString, QStringList> variables;
     for( QStringList::iterator it = result.begin(); it != result.end(); ++it )
     {
-        QRegExp re("\\$\\$([^{}\\) /]*)( |\\)|/|$)");
+        QRegExp re("\\$\\$([^{}\\) /]*)( |\\\\)|/|$)");
         int pos = 0;
         while( pos >= 0 )
         {
@@ -1517,8 +1517,8 @@
 
 bool Scope::containsContinue(const QString& s ) const
 {
-    return( s.find( QRegExp( "\\\\s*"+getLineEndingString() ) ) != -1
-            || s.find( QRegExp( "\\\\s*#" ) ) != -1 );
+    return( s.find( QRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1
+            || s.find( QRegExp( "\\\\\\s*#" ) ) != -1 );
 }
 
 bool Scope::isComment( const QString& s) const


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

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