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 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