<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/107904/">http://git.reviewboard.kde.org/r/107904/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On December 26th, 2012, 10:45 a.m., <b>Morten Volden</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I guess I'll just go and revert the changes I did last night for this. Your fix is much more elegant - dang! ;-)</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">By the way. I don't know if you can use it for anything, but here is the extension i did of the unittest.

diff --git outputview/tests/filteringstrategytest.cpp outputview/tests/filteringstrategytest.cpp
index 8ff26b5..a146f7e 100644
--- outputview/tests/filteringstrategytest.cpp
+++ outputview/tests/filteringstrategytest.cpp
@@ -98,6 +98,34 @@ void FilteringStrategyTest::testCompilerFilterstrategy()
     QVERIFY(item1.type == expectedAction);
 }
 
+void FilteringStrategyTest::testCompilerFilterstrategyCorrectType_data()
+{
+    QTest::addColumn<QString>("line");
+    QTest::addColumn<FilteredItem::FilteredOutputItemType>("expectedError");
+    QTest::addColumn<FilteredItem::FilteredOutputItemType>("expectedAction");
+
+    QTest::newRow("warning-containing-error-word")
+    << "RingBuffer.cpp:64:6: warning: unused parameter ‘errorItem’ [-Wunused-parameter]"
+    << FilteredItem::WarningItem << FilteredItem::InvalidItem;
+    QTest::newRow("error-containing-info-word")
+    << "NodeSet.hpp:89:27: error: ‘Info’ was not declared in this scope"
+    << FilteredItem::ErrorItem << FilteredItem::InvalidItem;
+}
+
+void FilteringStrategyTest::testCompilerFilterstrategyCorrectType()
+{
+    QFETCH(QString, line);
+    QFETCH(FilteredItem::FilteredOutputItemType, expectedError);
+    QFETCH(FilteredItem::FilteredOutputItemType, expectedAction);
+    KUrl projecturl( PROJECTS_SOURCE_DIR"/onefileproject/" );
+    CompilerFilterStrategy testee(projecturl);
+    FilteredItem item1 = testee.errorInLine(line);
+    QVERIFY(item1.type == expectedError);
+    item1 = testee.actionInLine(line);
+    QVERIFY(item1.type == expectedAction);
+}
+
+
 void FilteringStrategyTest::testScriptErrorFilterstrategy_data()
 {
     QTest::addColumn<QString>("line");
diff --git outputview/tests/filteringstrategytest.h outputview/tests/filteringstrategytest.h
index 0d9b943..508ac4f 100644
--- outputview/tests/filteringstrategytest.h
+++ outputview/tests/filteringstrategytest.h
@@ -31,6 +31,8 @@ private slots:
     void testNoFilterstrategy();
     void testCompilerFilterstrategy_data();
     void testCompilerFilterstrategy();
+    void testCompilerFilterstrategyCorrectType_data();
+    void testCompilerFilterstrategyCorrectType();
     void testCompilerFilterstrategyUrlFromAction_data();
     void testCompilerFilterstrategyUrlFromAction();
     void testScriptErrorFilterstrategy_data();</pre>
<br />








<p>- Morten</p>


<br />
<p>On December 24th, 2012, 8:07 p.m., Ivan Shapovalov wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDevelop and Morten Volden.</div>
<div>By Ivan Shapovalov.</div>


<p style="color: grey;"><i>Updated Dec. 24, 2012, 8:07 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix classification of error lines which look as
"file.cpp:100:10: error: 'SomeSymbolWithWarningInItsName' was not declared in this scope".

Here, we have an error pattern but also a "warning" keyword which actually is a part of symbol name. But existing code thinks that any appearance of "warning"/"info"/"note" in text is more important than the error pattern.

Fix this by
1) checking for all patterns in a uniform manner (loop for "string<->classification" pairs, not just for strings), and
2) picking the pattern which happened most early (to the left) in string.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">- Built kdevplatform+kdevelop with a couple of these lines, ensured they highlight as expected;
- Improved existing unit-tests to catch the error in question.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>outputview/outputfilteringstrategies.cpp <span style="color: grey">(91361f1)</span></li>

 <li>outputview/tests/testlinebuilderfunctions.h <span style="color: grey">(3d264f7)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/107904/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>