Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 662:43c61fd6fea4
Merge
author | Chris Cannam |
---|---|
date | Fri, 01 Mar 2013 09:20:11 +0000 |
parents | a16d0d70b1ee 005b4530c6ee |
children | cfe684675e81 |
comparison
equal
deleted
inserted
replaced
660:b1ba156b66e6 | 662:43c61fd6fea4 |
---|---|
2114 // check was successful but there are no changes | 2114 // check was successful but there are no changes |
2115 // pending. This is the only case where we need to remove | 2115 // pending. This is the only case where we need to remove |
2116 // warning messages, because it's the only case where a | 2116 // warning messages, because it's the only case where a |
2117 // non-zero code can be returned even though the command | 2117 // non-zero code can be returned even though the command |
2118 // has for our purposes succeeded | 2118 // has for our purposes succeeded |
2119 QString replaced = stdErr; | 2119 QStringList lines = stdErr.split(QRegExp("[\\r\\n]+")); |
2120 while (1) { | 2120 QString replaced; |
2121 QString r1 = replaced; | 2121 foreach (QString line, lines) { |
2122 r1.replace(QRegExp("warning: [^\\n]*"), ""); | 2122 line.replace(QRegExp("^.*warning: [^\\n]*"), ""); |
2123 if (r1 == replaced) break; | 2123 if (line != "") { |
2124 replaced = r1.trimmed(); | 2124 replaced += line + "\n"; |
2125 } | |
2125 } | 2126 } |
2126 if (replaced == "") { | 2127 if (replaced == "") { |
2127 showIncoming(""); | 2128 showIncoming(""); |
2128 return; | 2129 return; |
2129 } | 2130 } |