Commits

Chris Cannam committed 005b453

Be more flexible about the sorts of warning message we can remove in incoming

Comments (0)

Files changed (1)

             // 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("");