<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/107459/">http://git.reviewboard.kde.org/r/107459/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/107459/diff/2/?file=96150#file96150line503" style="color: black; font-weight: bold; text-decoration: underline;">libs/main/KoApplication.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int KoApplication::documents()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">503</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QList</span> <span class="o"><</span><span class="n">QString</span><span class="o">></span><span class="n">nameList</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">504</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QList</span><span class="o"><</span><span class="n">KoPart</span><span class="o">*></span> <span class="n">parts</span> <span class="o">=</span> <span class="n">d</span><span class="o">-></span><span class="n">partList</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">505</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">foreach</span><span class="p">(</span><span class="n">KoPart</span><span class="o">*</span> <span class="n">part</span><span class="p">,</span> <span class="n">parts</span><span class="p">)</span> <span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">506</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">nameList</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">part</span><span class="o">-></span><span class="n">document</span><span class="p">()</span><span class="o">-></span><span class="n">objectName</span><span class="p">());</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">507</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">508</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QSet</span><span class="o"><</span><span class="n">QString</span><span class="o">></span> <span class="n">finalSet</span> <span class="o">=</span> <span class="n">nameList</span><span class="p">.</span><span class="n">toSet</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think it is much simpler to just add the document directly to a QSet<QString> instead of first filling a list and then converting it to a set.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/107459/diff/2/?file=96151#file96151line193" style="color: black; font-weight: bold; text-decoration: underline;">sheets/functions/information.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">Value func_info(valVector args, ValueCalc *calc, FuncExtra *)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">192</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> return Value(KoDocument::documentList() ? KoDocument::documentList()->count() : 0);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">193</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KoApplication</span> <span class="o">*</span><span class="n">app</span> <span class="o">=</span> <span class="n">qobject_cast</span><span class="o"><</span><span class="n">KoApplication</span><span class="o">*></span><span class="p">(</span><span class="n">qApp</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">193</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">*/</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">194</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span><span class="p">(</span><span class="o">!</span> <span class="n">app</span><span class="p">)</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">195</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">Value</span><span class="p">(</span><span class="kc">false</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">196</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">197</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span><span class="p">(</span><span class="o">!</span> <span class="n">app</span><span class="o">-></span><span class="n">documents</span><span class="p">())</span> <span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">198</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">Value</span><span class="p">(</span><span class="kc">true</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">199</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">200</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">Value</span><span class="p">(</span><span class="kc">false</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">201</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="p">}</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This seems to be wrong. It should return the number of of documents in the vlaue and not true and false.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/107459/diff/2/?file=96152#file96152line338" style="color: black; font-weight: bold; text-decoration: underline;">sheets/tests/TestInformationFunctions.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void TestInformationFunctions::testINFO()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">338</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">CHECK_EVAL</span><span class="p">(</span><span class="s">"ISNUMBER(INFO(</span><span class="se">\"</span><span class="s">numfile</span><span class="se">\"</span><span class="s">))"</span><span class="p">,</span> <span class="n">Value</span><span class="p">(</span><span class="kc"><span class="hl">tru</span>e</span><span class="p">));</span> <span class="c1">//</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">338</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">CHECK_EVAL</span><span class="p">(</span><span class="s">"ISNUMBER(INFO(</span><span class="se">\"</span><span class="s">numfile</span><span class="se">\"</span><span class="s">))"</span><span class="p">,</span> <span class="n">Value</span><span class="p">(</span><span class="kc"><span class="hl">fals</span>e</span><span class="p">));</span> <span class="c1">//</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This looks wrong. The test was working before and it should still work with the fix.</pre>
</div>
<br />
<p>- Thorsten</p>
<br />
<p>On November 25th, 2012, 4:44 p.m., Sujith Haridasan 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 Calligra, Arjen Hiemstra, Boudewijn Rempt, Inge Wallin, and C. Boemann.</div>
<div>By Sujith Haridasan.</div>
<p style="color: grey;"><i>Updated Nov. 25, 2012, 4:44 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;">This patch helps to pass the issue in the http://build.kde.org/job/calligra_master/323/testReport/(root)/TestSuite/sheets_InformationFunctions/ because of which the test case TestInformationFunctions were failing.
The failure is as below:
FAIL! : Calligra::Sheets::TestInformationFunctions::testINFO() Compared values are not the same
Actual (evaluate("ISNUMBER(INFO(\"numfile\"))",z)): Boolean: FALSE
Expected ((z)): Boolean: TRUE
Loc: [/srv/jenkins/workspace/calligra_master/sheets/tests/TestInformationFunctions.cpp(338)]
</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;">I had done testing on my host machine. And here is the output:
sujith@kdekiddo:/media/kdedeveloper/kde-dev/kde/build/KDE/calligra/sheets/tests$ ./TestInformationFunctions
********* Start testing of Calligra::Sheets::TestInformationFunctions *********
Config: Using QTest library 4.8.4, Qt 4.8.4
QDEBUG : Calligra::Sheets::TestInformationFunctions::initTestCase() qttest(27285)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/home/sujith/.kde-unit-test/cache-kdekiddo/ksycoca4"
PASS : Calligra::Sheets::TestInformationFunctions::initTestCase()
PASS : Calligra::Sheets::TestInformationFunctions::testAREAS()
PASS : Calligra::Sheets::TestInformationFunctions::testCELL()
PASS : Calligra::Sheets::TestInformationFunctions::testCOLUMN()
PASS : Calligra::Sheets::TestInformationFunctions::testCOLUMNS()
PASS : Calligra::Sheets::TestInformationFunctions::testCOUNT()
PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTA()
PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTBLANK()
PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTIF()
PASS : Calligra::Sheets::TestInformationFunctions::testERRORTYPE()
PASS : Calligra::Sheets::TestInformationFunctions::testFORMULA()
PASS : Calligra::Sheets::TestInformationFunctions::testINFO()
PASS : Calligra::Sheets::TestInformationFunctions::testISBLANK()
PASS : Calligra::Sheets::TestInformationFunctions::testISERR()
PASS : Calligra::Sheets::TestInformationFunctions::testISERROR()
PASS : Calligra::Sheets::TestInformationFunctions::testISEVEN()
PASS : Calligra::Sheets::TestInformationFunctions::testISFORMULA()
PASS : Calligra::Sheets::TestInformationFunctions::testISLOGICAL()
PASS : Calligra::Sheets::TestInformationFunctions::testISNONTEXT()
PASS : Calligra::Sheets::TestInformationFunctions::testISNA()
PASS : Calligra::Sheets::TestInformationFunctions::testISNUMBER()
PASS : Calligra::Sheets::TestInformationFunctions::testISODD()
PASS : Calligra::Sheets::TestInformationFunctions::testISTEXT()
PASS : Calligra::Sheets::TestInformationFunctions::testISREF()
PASS : Calligra::Sheets::TestInformationFunctions::testMATCH()
PASS : Calligra::Sheets::TestInformationFunctions::testN()
PASS : Calligra::Sheets::TestInformationFunctions::testNA()
PASS : Calligra::Sheets::TestInformationFunctions::testROW()
PASS : Calligra::Sheets::TestInformationFunctions::testROWS()
PASS : Calligra::Sheets::TestInformationFunctions::testSHEET()
PASS : Calligra::Sheets::TestInformationFunctions::testSHEETS()
PASS : Calligra::Sheets::TestInformationFunctions::testTYPE()
PASS : Calligra::Sheets::TestInformationFunctions::testVALUE()
PASS : Calligra::Sheets::TestInformationFunctions::cleanupTestCase()
Totals: 34 passed, 0 failed, 0 skipped
********* Finished testing of Calligra::Sheets::TestInformationFunctions *********
sujith@kdekiddo:/media/kdedeveloper/kde-dev/kde/build/KDE/calligra/sheets/tests$</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>libs/main/KoApplication.h <span style="color: grey">(b0bcab2)</span></li>
<li>libs/main/KoApplication.cpp <span style="color: grey">(8ac4639)</span></li>
<li>sheets/functions/information.cpp <span style="color: grey">(5ae962d)</span></li>
<li>sheets/tests/TestInformationFunctions.cpp <span style="color: grey">(d0adc68)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107459/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>