<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/D24372">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/D24372#inline-138395">View Inline</a><span style="color: #4b4d51; font-weight: bold;">job.cpp:181</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">// kill all subjobs, without triggering their result slot</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="bright"></span><span class="n"><span class="bright">Q_FOREACH</span></span> <span class="p">(</span><span class="n">KJob</span> <span style="color: #aa2211">*<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">it</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span> <span class="n">subjobs</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="bright"></span><span class="n"><span class="bright">it</span></span><span style="color: #aa2211">-></span><span class="n">kill</span><span class="p">(</span><span class="n">KJob</span><span style="color: #aa2211">::</span><span class="n">Quietly</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="bright"></span><span style="color: #aa4000"><span class="bright">for</span></span> <span class="p">(</span><span class="n">KJob</span> <span style="color: #aa2211">*<span class="bright"></span></span><span class="bright"></span><span style="color: #a0a000"><span class="bright">job</span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">subjobs</span><span class="p">())</span> <span class="p">{</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">job</span></span><span style="color: #aa2211">-></span><span class="n">kill</span><span class="p">(</span><span class="n">KJob</span><span style="color: #aa2211">::</span><span class="n">Quietly</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You need a local const var to hold the result of the subjobs() method call.</p>

<p style="padding: 0; margin: 8px;">(repeats)</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/D24372#inline-138396">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ksslcertificatemanager.cpp:380</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">foreach</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">const</span></span><span class="bright"> </span><span class="n"><span class="bright">QSslCertificate</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">cert</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">QSslCertificate</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">fromPath</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">userCertDir</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">QLatin1Char</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><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(251, 175, 175, .7);">             <span class="bright"></span><span class="n"><span class="bright">QSsl</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">Pem</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span> <span class="n">QRegExp</span><span style="color: #aa2211">::</span><span class="n">Wildcard</span><span class="p">)<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="bright"></span><span style="color: #aa4000"><span class="bright">const</span></span><span class="bright"> </span><span class="n"><span class="bright">QList</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">QSslCertificate</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">list2</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">QSslCertificate</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">fromPath</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">userCertDir</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">QLatin1Char</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><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">QSsl</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">Pem</span></span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">             <span class="bright">                                                     </span> <span class="n">QRegExp</span><span style="color: #aa2211">::</span><span class="n">Wildcard</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;"><tt style="background: #ebebeb; font-size: 13px;">userList</tt> would be a better variable name</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/D24372#inline-138397">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ktcpsocket.cpp:729</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">cl</span><span class="p">.</span><span class="n">reserve</span><span class="p">(</span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">ciphers</span><span class="p">.</span><span class="n">size</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="n">for<span class="bright">each</span></span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">KSslCipher</span> <span style="color: #aa2211">&</span><span class="n">c<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">ciphers</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">KSslCipher</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">c<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">qAsConst</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">ciphers<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">cl</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">ccc</span><span class="p">.</span><span class="n">converted</span><span class="p">(</span><span class="n">c</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">or just iterate over <tt style="background: #ebebeb; font-size: 13px;">ciphers</tt>, which is already const</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/D24372#inline-138398">View Inline</a><span style="color: #4b4d51; font-weight: bold;">scheduler.cpp:214</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">ret</span><span class="p">.</span><span class="n">reserve</span><span class="p">(</span><span class="n">m_runningJobs</span><span class="p">.</span><span class="n">size</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="bright"></span><span class="n"><span class="bright">Q_FOREACH</span></span> <span class="p">(</span><span class="n">SimpleJob</span> <span style="color: #aa2211">*</span><span class="n">job<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n">m_runningJobs</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="bright"></span><span style="color: #aa4000"><span class="bright">for</span></span> <span class="p">(</span><span class="n">SimpleJob</span> <span style="color: #aa2211">*</span><span style="color: #a0a000">job<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">qAsConst</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">m_runningJobs<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">Slave</span> <span style="color: #aa2211">*</span><span class="n">slave</span> <span style="color: #aa2211">=</span> <span class="n">jobSlave</span><span class="p">(</span><span class="n">job</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">qAsConst not needed, this method is const</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/D24372#inline-138399">View Inline</a><span style="color: #4b4d51; font-weight: bold;">scheduler.cpp:299</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">PerSlaveQueue</span> <span style="color: #aa2211">&</span><span class="n">jobs</span> <span style="color: #aa2211">=</span> <span class="n">it</span><span class="p">.</span><span class="n">value</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="bright"></span><span class="n"><span class="bright">Q_FOREACH</span></span> <span class="p">(</span><span class="n">SimpleJob</span> <span style="color: #aa2211">*</span><span class="n">job<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n">jobs</span><span class="p">.</span><span class="n">waitingList</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="bright"></span><span style="color: #aa4000"><span class="bright">for</span></span> <span class="p">(</span><span class="n">SimpleJob</span> <span style="color: #aa2211">*</span><span style="color: #a0a000">job<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">qAsConst</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">jobs</span><span class="p">.</span><span class="n">waitingList<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #74777d">// ### for compatibility with the old scheduler we don't touch the running job, if any.</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'm afraid that kill() ends up removing the job from waitingList. I would iterate over a copy to be safe.</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/D24372#inline-138400">View Inline</a><span style="color: #4b4d51; font-weight: bold;">scheduler.cpp:377</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">Q_UNUSED</span><span class="p">(</span><span class="n">runningJobsCount</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; "><span style="color: #304a96">#ifdef SCHEDULER_DEBUG</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">int</span> <span class="n">realRunningJobsCount</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;">Did you try enabling this to make sure your ported code compiles?</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/D24372#inline-138401">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dropjob.cpp:270</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: #aa4000">bool</span> <span class="n">containsTrashRoot</span> <span style="color: #aa2211">=</span> <span style="color: #304a96">false</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="n">for<span class="bright">each</span></span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span class="n">url<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">url<span class="bright"></span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #aa4000">const</span> <span style="color: #aa4000">bool</span> <span class="n">local</span> <span style="color: #aa2211">=</span> <span class="n">url</span><span class="p">.</span><span class="n">isLocalFile</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">qAsConst</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/D24372#inline-138402">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dropjob.cpp:329</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">fileItems</span><span class="p">.</span><span class="n">reserve</span><span class="p">(</span><span class="n">m_urls</span><span class="p">.</span><span class="n">size</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="n">for<span class="bright">each</span></span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span class="n">url<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">url<span class="bright"></span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">fileItems</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">KFileItem</span><span class="p">(</span><span class="n">url</span><span class="p">));</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">qAsConst</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/D24372#inline-138403">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dropjob.cpp:361</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: #aa4000">bool</span> <span class="n">equalDestination</span> <span style="color: #aa2211">=</span> <span style="color: #304a96">true</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="n">for<span class="bright">each</span></span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span class="n">src<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">src<span class="bright"></span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">m_urls</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">            <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">m_destUrl</span><span class="p">.</span><span class="n">matches</span><span class="p">(</span><span class="n">src</span><span class="p">.</span><span class="n">adjusted</span><span class="p">(</span><span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">RemoveFilename</span><span class="p">),</span> <span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">StripTrailingSlash</span><span class="p">))</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">qAsConst</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/D24372#inline-138404">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kdirmodel.cpp:151</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">urls</span><span class="p">.</span><span class="n">reserve</span><span class="p">(</span><span class="n">urls</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span style="color: #aa2211">+</span> <span class="n">m_childNodes</span><span class="p">.</span><span class="n">size</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="bright"></span><span class="n"><span class="bright">Q_FOREACH</span></span> <span class="p">(</span><span class="n">KDirModelNode</span> <span style="color: #aa2211">*</span><span class="n">node<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n">m_childNodes</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="bright"></span><span style="color: #aa4000"><span class="bright">for</span></span> <span class="p">(</span><span class="n">KDirModelNode</span> <span style="color: #aa2211">*</span><span style="color: #a0a000">node<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">qAsConst</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">m_childNodes<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">            <span style="color: #aa4000">const</span> <span class="n">KFileItem</span> <span style="color: #aa2211">&</span><span class="n">item</span> <span style="color: #aa2211">=</span> <span class="n">node</span><span style="color: #aa2211">-></span><span class="n">item</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">qAsConst not needed, method is const</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/D24372#inline-138405">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfileitemdelegate.cpp:233</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">for<span class="bright">each</span></span> <span class="p">(</span><span class="n">KFileItemDelegate</span><span style="color: #aa2211">::</span><span class="n">Information</span> <span class="n">info<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n">informationList</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">for</span> <span class="p">(</span><span class="n">KFileItemDelegate</span><span style="color: #aa2211">::</span><span class="n">Information</span> <span style="color: #a0a000">info<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">qAsConst</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">informationList<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">info</span> <span style="color: #aa2211">==</span> <span class="n">KFileItemDelegate</span><span style="color: #aa2211">::</span><span class="n">NoInformation</span><span class="p">)</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">not needed, method is const and informationList is a member</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/D24372">https://phabricator.kde.org/D24372</a></div></div><br /><div><strong>To: </strong>ahmadsamir, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>