<table><tr><td style="">dfaure requested changes to this revision.<br />dfaure added inline comments.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11604">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79445">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:374</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyStarted</span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span style="color: #601200">0</span><span class="p">);</span> <span style="color: #74777d">// fast path: no directory listing needed</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">Q<span class="bright">COMPARE</span></span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyCompleted</span><span class="p">.</span><span class="n">count</span><span class="p">()<span class="bright">,</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">0</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">Q<span class="bright">COMPARE</span></span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyCompletedQUrl</span><span class="p">.</span><span class="n">count</span><span class="p">()<span class="bright">,</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">0</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>COMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyStarted</span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span style="color: #601200">0</span><span class="p">);</span> <span style="color: #74777d">// fast path: no directory listing needed</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_VERIFY</span></span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyCompleted</span><span class="p">.</span><span class="n">count</span><span class="p">()<span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">2</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_VERIFY</span></span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyCompletedQUrl</span><span class="p">.</span><span class="n">count</span><span class="p">()<span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">2</span></span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">that's immediately true since it's 0 initially, so the TRY_ brings nothing. It's not like it's going to down if we wait ;)</p>
<p style="padding: 0; margin: 8px;">Same for the lines before and after, actually.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79455">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:453</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">org</span><span style="color: #aa2211">::</span><span class="n">kde</span><span style="color: #aa2211">::</span><span class="n">KDirNotify</span><span style="color: #aa2211">::</span><span class="n">emitFilesChanged</span><span class="p">(</span><span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">QUrl</span><span style="color: #aa2211">></span><span class="p">()</span> <span style="color: #aa2211"><<</span> <span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">path</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">Q<span class="bright">VERIFY</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">waitForR</span>efreshedItems<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">()</span>);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_COMPARE</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">m_r</span>efreshedItems<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">isEmpty</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span style="color: #304a96"><span class="bright">false</span></span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I keep thinking that this would be more readable as</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">QTRY_VERIFY(!m_refreshedItems.isEmpty())</pre></div>
<p style="padding: 0; margin: 8px;">But YMMV.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79446">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:480</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="n"><span class="bright">QCOMPARE</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">m_dirLister</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">spyItemsD</span>eleted<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">count</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">1</span></span><span class="bright"></span><span class="p"><span class="bright">);</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #74777d"><span class="bright">// The signal could be emited 1 time with all the d</span>eleted<span class="bright"> files or more times</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QTRY_VERIFY</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyItemsDeleted</span><span class="p">.</span><span class="n">count</span><span class="p">()</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">How? This test is deleting a single file... I don't get it.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79447">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:513</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// The signal could be emited 1 time with all the deleted files or more times</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QTRY_VERIFY</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyItemsDeleted</span><span class="p">.</span><span class="n">count</span><span class="p">()</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">The problem is, this will likely move on after the first signal is emitted.</p>
<p style="padding: 0; margin: 8px;">I think we need to sum up the number of items emitted by the deleted signals and wait until we reach 100.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79448">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:923</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">dirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">dirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">there's nothing to wait for here, no TRY_ needed.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79449">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:940</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #74777d">// this is why this unittest needs to create a test file in the subdir.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QT<span class="bright">est</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">qWait</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #601200"><span class="bright">1000</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QT<span class="bright">RY_VERIFY</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">m_items</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">isEmpty</span></span><span class="bright"></span><span class="p"><span class="bright">()</span>);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This is one case where the new code isn't equivalent to the old code.</p>
<p style="padding: 0; margin: 8px;">Starting with an empty list, "wait until it's empty" will move on immediately, while the old code was doing "wait a second and ensure the list is still empty afterwards".</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79451">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:976</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">spyCompleted</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span style="color: #601200">1000</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">empty</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">empty</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">We just waited for the completed signal, why wait again? I don't think this TRY_ is needed.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79450">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:977</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">empty</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">m_items</span><span class="p">.</span><span class="n">empty</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">rootItem</span><span class="p">().</span><span class="n">url</span><span class="p">().</span><span class="n">toLocalFile</span><span class="p">(),</span> <span class="n">path</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">no TRY_ needed</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79452">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:987</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #74777d">// Check that the URL of the root item got updated</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">rootItem</span><span class="p">().</span><span class="n">url</span><span class="p">().</span><span class="n">toLocalFile</span><span class="p">(),</span> <span class="n">newPath</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>COMPARE</span><span class="p">(</span><span class="n">secondDirLister</span><span class="p">.</span><span class="n">rootItem</span><span class="p">().</span><span class="n">url</span><span class="p">().</span><span class="n">toLocalFile</span><span class="p">(),</span> <span class="n">newPath</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">same here, this isn't async, it's done by the redirection handling, which we just waited for.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79453">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:1011</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">spyCompleted</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span style="color: #601200">1000</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QVERIFY</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>VERIFY</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">isFinished</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">as above</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D11604#inline-79454">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirlistertest.cpp:1054</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="n"><span class="bright">enterLoop</span></span><span class="bright"></span><span class="p"><span class="bright">();</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spy<span class="bright">Started</span></span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span class="bright"></span><span style="color: #601200"><span class="bright">1</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyC<span class="bright">omplete</span>d</span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span style="color: #601200">0</span><span class="p">);<span class="bright"></span></span><span class="bright"> </span><span style="color: #74777d"><span class="bright">// we stopped before the listing.</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span class="n"><span class="bright">QTRY_COMPARE</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">m_dirLister</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">spyCompleted</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">count</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">0</span></span><span class="bright"></span><span class="p"><span class="bright">);</span></span><span class="bright"> </span><span style="color: #74777d"><span class="bright">// we stopped before the listing.</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>COMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spy<span class="bright">CompletedQUrl</span></span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span class="bright"></span><span style="color: #601200"><span class="bright">0</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">Q<span class="bright">TRY_</span>COMPARE</span><span class="p">(</span><span class="n">m_dirLister</span><span class="p">.</span><span class="n">spyC<span class="bright">ancele</span>d</span><span class="p">.</span><span class="n">count</span><span class="p">(),</span> <span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">any QTRY_COMPARE(spy.count(), 0) is pretty useless to me. It's 0 already, we'll never wait. (or if it's not 0, we'll wait and fail, instead of failing right away)</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11604">https://phabricator.kde.org/D11604</a></div></div><br /><div><strong>To: </strong>jtamate, Frameworks, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, apol, michaelh, ngraham, bruns<br /></div>