<table><tr><td style="">aacid added a comment.
</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/D19539">View Revision</a></tr></table><br /><div><div><p>Sorry it did take a while to asnwer, since you're not using arc i can't use phabricator to navigate the code and have to find time to sit don't and check whether some of those variables were const or not because their declaration was outside the lines of the diff</p>

<p>Ok, now that i did that, a few of the don't need qAsConst, adding it doesn't make it worse, but it's a bit weird so i'd prefer if you removed it.</p></div></div><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/D19539#inline-110876">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pageview.cpp:1090</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">// create children widgets</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">QVector</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">Page</span> <span style="color: #aa2211">*</span> <span class="bright"></span><span style="color: #aa2211"><span class="bright">>::</span></span><span class="bright"></span><span class="n"><span class="bright">const_iterator</span></span><span class="bright"> </span><span class="n"><span class="bright">setIt</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n">page<span class="bright">Set</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">c</span>onst<span class="bright">Begin</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span class="n"><span class="bright">setEnd</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span> <span class="n">pageSet<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">constEnd</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 style="color: #aa4000">for</span> <span class="p">(</span> <span class="p">;</span> <span class="n">setIt</span> <span style="color: #aa2211">!=</span> <span class="n">setEnd</span><span class="p">;</span> <span style="color: #aa2211">++</span><span class="n">setIt</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="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">Okular</span><span style="color: #aa2211">::</span><span class="n">Page</span> <span style="color: #aa2211">*</span> <span style="color: #a0a000">page<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">qAsC</span>onst<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span> <span class="n">pageSet<span class="bright"></span></span><span class="bright"> </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; ">    <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">you don't need qAsConst, pageSet is already const as defined in the function signature.</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/D19539#inline-110875">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pageview.cpp:1098</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 style="color: #aa4000">const</span> <span class="n">QLinkedList</span><span style="color: #aa2211"><</span> <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">FormField</span> <span style="color: #aa2211">*</span> <span style="color: #aa2211">></span> <span class="n">pageFields</span> <span style="color: #aa2211">=</span> <span class="bright"></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 class="n"><span class="bright">setIt</span></span><span class="bright"></span><span class="p"><span class="bright">)</span></span><span style="color: #aa2211">-></span><span class="n">formFields</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">QLinkedList</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">Okular</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">FormField</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</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">const_iterator</span></span><span class="bright"> </span><span class="n"><span class="bright">ffIt</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">pageFields</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">constBegin</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span class="n"><span class="bright">ffEnd</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">pageFields</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">constEnd</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 style="color: #aa4000">for</span> <span class="p">(</span> <span class="p">;</span> <span class="n">ffIt</span> <span style="color: #aa2211">!=</span> <span class="n">ffEnd</span><span class="p">;</span> <span style="color: #aa2211">++</span><span class="n">ffIt</span> <span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">const</span> <span class="n">QLinkedList</span><span style="color: #aa2211"><</span> <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">FormField</span> <span style="color: #aa2211">*</span> <span style="color: #aa2211">></span> <span class="n">pageFields</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span class="n"><span class="bright">page</span></span><span style="color: #aa2211">-></span><span class="n">formFields</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="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"> </span><span class="n"><span class="bright">Okular</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">FormField</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"> </span><span style="color: #a0a000"><span class="bright">ff</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="bright"> </span><span class="n"><span class="bright">pageFields</span></span><span class="bright"> </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; ">        <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">FormField</span> <span style="color: #aa2211">*</span> <span class="n">ff</span> <span style="color: #aa2211">=</span> <span style="color: #aa2211">*</span><span class="n">ffIt</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You don't need qAsConst here, pageFields is already const as defined in the line 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/D19539#inline-110877">View Inline</a><span style="color: #4b4d51; font-weight: bold;">presentationwidget.cpp:332</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">float</span> <span class="n">screenRatio</span> <span style="color: #aa2211">=</span> <span class="p">(</span><span style="color: #aa4000">float</span><span class="p">)</span><span class="n">m_height</span> <span style="color: #aa2211">/</span> <span class="p">(</span><span style="color: #aa4000">float</span><span class="p">)</span><span class="n">m_width</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span style="color: #aa4000">for</span> <span class="p">(</span> <span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">setIt</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">setEnd</span></span><span class="bright"></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 class="n"><span class="bright">setIt</span></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="bright"></span><span style="color: #aa4000"><span class="bright">const</span></span><span class="bright"> </span><span class="n"><span class="bright">Okular</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">Page</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"> </span><span style="color: #a0a000"><span class="bright">page</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="bright"> </span><span class="n"><span class="bright">pageSet</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="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">pageset is const, please remove 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/D19539#inline-110878">View Inline</a><span style="color: #4b4d51; font-weight: bold;">presentationwidget.cpp:337</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 style="color: #aa4000">const</span> <span class="n">QLinkedList</span><span style="color: #aa2211"><</span> <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">Annotation</span> <span style="color: #aa2211">*</span> <span style="color: #aa2211">></span> <span class="n">annotations</span> <span style="color: #aa2211">=</span> <span class="bright"></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 class="n"><span class="bright">setIt</span></span><span class="bright"></span><span class="p"><span class="bright">)</span></span><span style="color: #aa2211">-></span><span class="n">annotations</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">QLinkedList</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">Okular</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">Annotation</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</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">const_iterator</span></span><span class="bright"> </span><span class="n"><span class="bright">aIt</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">annotations</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">begin</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"> </span><span class="n"><span class="bright">aEnd</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">annotations</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">end</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 style="color: #aa4000">for</span> <span class="p">(</span> <span class="p">;</span> <span class="n">aIt</span> <span style="color: #aa2211">!=</span> <span class="n">aEnd</span><span class="p">;</span> <span style="color: #aa2211">++</span><span class="n">aIt</span> <span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">const</span> <span class="n">QLinkedList</span><span style="color: #aa2211"><</span> <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">Annotation</span> <span style="color: #aa2211">*</span> <span style="color: #aa2211">></span> <span class="n">annotations</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span class="n"><span class="bright">page</span></span><span style="color: #aa2211">-></span><span class="n">annotations</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="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"> </span><span class="n"><span class="bright">Okular</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">Annotation</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"> </span><span style="color: #a0a000"><span class="bright">a</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="bright"> </span><span class="n"><span class="bright">annotations</span></span><span class="bright"> </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; ">        <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">Okular</span><span style="color: #aa2211">::</span><span class="n">Annotation</span> <span style="color: #aa2211">*</span> <span class="n">a</span> <span style="color: #aa2211">=</span> <span style="color: #aa2211">*</span><span class="n">aIt</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">annotations is const, please remove qasconst</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19539">https://phabricator.kde.org/D19539</a></div></div><br /><div><strong>To: </strong>sander, Okular<br /><strong>Cc: </strong>aacid, davidhurka, okular-devel, tfella, ngraham, darcyshen<br /></div>