CVS commit by neundorf: -optimization: seems to reduce parsing time from 24 to 22 sec on my 2 GHz box for a lot of "undefined references" by getting rid of one QString variable and the associated malloc()s and a stripWhiteSpace() -changes the behaviour slightly: -if a continuation is found there might be still some white space at the beginning of the appended string -if not there might be some whitespace at the beginning and the end of the appended string if this isn't ok feel free to revert Alex M +16 -15 commandcontinuationfilter.cpp 1.4 --- kdevelop/parts/outputviews/commandcontinuationfilter.cpp #1.3:1.4 @@ -21,19 +21,20 @@ CommandContinuationFilter::CommandContin void CommandContinuationFilter::processLine( const QString& line ) { - bool foundLineCont = false; - QString s = line.stripWhiteSpace(); - if (s.endsWith("\\")) + int index=line.length()-1; + while (index>=0) { - m_text += s.left(s.length() - 1); - foundLineCont = true; - } else + if (line[index]=='\\') { - m_text += line; + m_text += line.left(index); + return; } - if ( !foundLineCont ) - { + if (!line[index].isSpace()) + break; + index--; + } + + m_text+=line; OutputFilter::processLine( m_text ); m_text = ""; - } }