# HG changeset patch # User Chris Cannam # Date 1352472482 0 # Node ID 005b4530c6eeefacf87b43b00a5faa7459aaec20 # Parent b16e8ef6919b4982aea5453154b99e0338ff3e05 Be more flexible about the sorts of warning message we can remove in incoming diff -r b16e8ef6919b -r 005b4530c6ee src/mainwindow.cpp --- a/src/mainwindow.cpp Fri Oct 19 12:08:11 2012 +0100 +++ b/src/mainwindow.cpp Fri Nov 09 14:48:02 2012 +0000 @@ -2109,12 +2109,13 @@ // warning messages, because it's the only case where a // non-zero code can be returned even though the command // has for our purposes succeeded - QString replaced = stdErr; - while (1) { - QString r1 = replaced; - r1.replace(QRegExp("warning: [^\\n]*"), ""); - if (r1 == replaced) break; - replaced = r1.trimmed(); + QStringList lines = stdErr.split(QRegExp("[\\r\\n]+")); + QString replaced; + foreach (QString line, lines) { + line.replace(QRegExp("^.*warning: [^\\n]*"), ""); + if (line != "") { + replaced += line + "\n"; + } } if (replaced == "") { showIncoming("");