changeset 662:43c61fd6fea4

Merge
author Chris Cannam
date Fri, 01 Mar 2013 09:20:11 +0000
parents b1ba156b66e6 (current diff) 005b4530c6ee (diff)
children f9b805d8cab4 cfe684675e81
files src/mainwindow.cpp
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/mainwindow.cpp	Thu Feb 14 15:16:33 2013 +0000
+++ b/src/mainwindow.cpp	Fri Mar 01 09:20:11 2013 +0000
@@ -2116,12 +2116,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("");