<table><tr><td style="">dhaumann added inline comments.
</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/D24261">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/D24261#inline-137432">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kedittoolbar.cpp:1566</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="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">XmlDataList</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">Iterator</span></span><span class="bright"> </span><span class="n"><span class="bright">xit</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span> <span class="n">m_xmlFiles<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">begin</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 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">xit</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">m_</span>xmlFile<span class="bright">s</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><span class="bright"> </span><span style="color: #aa2211"><span class="bright">++</span></span><span class="bright"></span><span class="n"><span class="bright">xit</span></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 style="color: #aa4000">if</span> <span class="p">((</span><span style="color: #aa2211">*</span><span class="n">xit</span><span class="p">).</span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">XmlData</span><span style="color: #aa2211">::</span><span class="n">Merged</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="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">auto</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">xmlFile</span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">m_xmlFiles<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; background: rgba(151, 234, 151, .6);"> <span class="bright"> </span><span style="color: #aa4000"><span class="bright">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="n">xmlFile<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">type</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">XmlData</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">Merged</span></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;">No qAsConst? If done by intention, maybe keep the iterator version?</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/D24261#inline-137433">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kgesture.cpp:117</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">d</span><span style="color: #aa2211">-></span><span class="n">m_shape</span><span class="p">.</span><span class="n">translate</span><span class="p">(</span><span style="color: #aa2211">-</span><span class="n">bounding</span><span class="p">.</span><span class="n">left</span><span class="p">(),</span> <span style="color: #aa2211">-</span><span class="n">bounding</span><span class="p">.</span><span class="n">top</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 class="bright"></span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">int</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">0</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span> <span class="n">d</span><span style="color: #aa2211">-></span><span class="n">m_shape<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">size</span></span><span class="bright"></span><span class="p"><span class="bright">();</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">++</span></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">d</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">m_</span>shape<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">i</span></span><span class="bright"></span><span class="p"><span class="bright">]</span>.</span><span class="n">setX</span><span class="p">((</span><span style="color: #aa4000">int</span><span class="p">)(</span><span class="n">xScale</span> <span style="color: #aa2211">*</span> <span class="p">(</span><span style="color: #aa4000">float</span><span class="p">)<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">d</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">m_</span>shape<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">i</span></span><span class="bright"></span><span class="p"><span class="bright">]</span>.</span><span class="n">x</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 class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">QPoint</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">shape</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">m_shape</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="n">shape</span><span class="p">.</span><span class="n">setX</span><span class="p">((</span><span style="color: #aa4000">int</span><span class="p">)(</span><span class="n">xScale</span> <span style="color: #aa2211">*</span> <span class="p">(</span><span style="color: #aa4000">float</span><span class="p">)</span><span class="n">shape</span><span class="p">.</span><span class="n">x</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/D24261#inline-137434">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kgesture.cpp:131</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">int</span> <span class="n">prevY</span> <span style="color: #aa2211">=</span> <span class="n">d</span><span style="color: #aa2211">-></span><span class="n">m_shape</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span class="n">y</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 class="bright"></span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">int</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">1</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">m_shape<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">size</span></span><span class="bright"></span><span class="p"><span class="bright">();</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">++</span></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 style="color: #aa4000">int</span> <span class="n">curX</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span class="n"><span class="bright">d</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">m_</span>shape<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">i</span></span><span class="bright"></span><span class="p"><span class="bright">]</span>.</span><span class="n">x</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 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">QPoint</span></span><span class="bright"> </span><span style="color: #a0a000"><span class="bright">shape</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">m_shape<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; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">int</span> <span class="n">curX</span> <span style="color: #aa2211">=</span> <span class="n">shape</span><span class="p">.</span><span class="n">x</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><ol class="remarkup-list">
<li class="remarkup-list-item">QPoint &, or is sizeof QPoint==8?</li>
<li class="remarkup-list-item">Previously, the loop started at index 1.</li>
</ol></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/D24261#inline-137435">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kgesture.cpp:165</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">int</span> <span class="bright"></span><span class="n"><span class="bright">i</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 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">i</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">0</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">d</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">m_</span>shape</span><span class="p">.<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">size</span></span><span class="bright"></span><span class="p"><span class="bright">();</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"></span><span style="color: #aa2211"><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; 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"><span class="bright">QPo</span>int</span> <span class="bright"></span><span style="color: #a0a000"><span class="bright">shape</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">d</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">m_shape</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; background: rgba(151, 234, 151, .6);"> <span class="bright"> </span><span class="n"><span class="bright">ret</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 style="color: #aa2211"><span class="bright">+</span></span><span class="bright"> </span><span class="n"><span class="bright">QString</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">number</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">shape</span><span class="p">.<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">x</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>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">QPoint &</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/D24261#inline-137436">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kmainwindow.cpp:349</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">// Clean up for dbus usage: any non-alphanumeric char should be turned into '_'</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">const</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">int</span></span><span class="bright"> </span><span class="n"><span class="bright">len</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span> <span class="n">dbusName<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">length</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 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">int</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">0</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">len</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">i</span></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="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">QChar</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">c</span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">dbusName<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; background: rgba(151, 234, 151, .6);"> <span class="bright"> </span><span style="color: #aa4000"><span class="bright">if</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">isValidDBusObjectPathCharacter</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></span><span class="bright"></span><span class="p"><span class="bright">)</span>)</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/D24261#inline-137437">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kshortcutseditor.cpp:715</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">QList</span><span style="color: #aa2211"><</span><span class="n">QPair</span><span style="color: #aa2211"><</span><span class="n">QString</span><span class="p">,</span> <span class="n">ColumnDesignation</span><span style="color: #aa2211">><span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211">></span> <span class="n">shortcutTitleToColumn<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">shortcutTitleToColumn</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><<</span></span> <span class="n">qMakePair</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Main:"</span><span class="p">),</span> <span class="n">LocalPrimary</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">QList</span><span style="color: #aa2211"><</span><span class="n">QPair</span><span style="color: #aa2211"><</span><span class="n">QString</span><span class="p">,</span> <span class="n">ColumnDesignation</span><span style="color: #aa2211">>></span> <span class="n">shortcutTitleToColumn<span class="bright">Map</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 class="n">qMakePair</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Main:"</span><span class="p">),</span> <span class="n">LocalPrimary</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;">Maybe make it a QVector. Or simply an initializer list.</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/D24261#inline-137438">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kswitchlanguagedialog_p.cpp:373</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">// We get en-US here but we use en_US</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 class="bright"></span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">int</span></span><span class="bright"> </span><span class="n"><span class="bright">i</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">0</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">i</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span> <span class="n">languagesList<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: #aa2211"><span class="bright">++</span></span><span class="bright"></span><span class="n"><span class="bright">i</span></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="n">language<span class="bright">sList</span></span><span class="bright"></span><span class="p"><span class="bright">[</span></span><span class="bright"></span><span class="n"><span class="bright">i</span></span><span class="bright"></span><span class="p"><span class="bright">]</span>.</span><span class="n">replace</span><span class="p">(</span><span class="n">QLatin1Char</span><span class="p">(</span><span style="color: #766510">'-'</span><span class="p">),</span> <span class="n">QLatin1Char</span><span class="p">(</span><span style="color: #766510">'_'</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 class="bright"></span></span><span class="bright"></span><span style="color: #aa4000"><span class="bright">auto</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">language</span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span> <span class="n">languagesList</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="n">language</span><span class="p">.</span><span class="n">replace</span><span class="p">(</span><span class="n">QLatin1Char</span><span class="p">(</span><span style="color: #766510">'-'</span><span class="p">),</span> <span class="n">QLatin1Char</span><span class="p">(</span><span style="color: #766510">'_'</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/D24261#inline-137439">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ktoolbar.cpp:187</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="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 style="color: #aa4000">int<span class="bright"></span></span><span class="bright"> </span><span class="n"><span class="bright">level</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">0</span></span><span class="bright"></span><span class="p"><span class="bright">;</span></span><span class="bright"> </span><span class="n"><span class="bright">level</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">NSettingLevels</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">level</span></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="n">value<span class="bright">s</span></span><span class="bright"></span><span class="p"><span class="bright">[</span></span><span class="bright"></span><span class="n"><span class="bright">level</span></span><span class="bright"></span><span class="p"><span class="bright">]</span></span> <span style="color: #aa2211">=</span> <span class="n">Unset</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">int<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: #a0a000"><span class="bright">value</span></span><span class="bright"> </span><span class="p"><span class="bright">:</span></span><span class="bright"> </span><span class="n"><span class="bright">values</span></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="n">value</span> <span style="color: #aa2211">=</span> <span class="n">Unset</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Let's say values detaches here, then the changes value doesn't have any effect on the original one.</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/D24261#inline-137440">View Inline</a><span style="color: #4b4d51; font-weight: bold;">ktoolbar.cpp:376</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">// Scalable icons.</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">progression</span><span class="p">[]</span> <span style="color: #aa2211">=</span> <span class="p">{</span> <span style="color: #601200">16</span><span class="p">,</span> <span style="color: #601200">22</span><span class="p">,</span> <span style="color: #601200">32</span><span class="p">,</span> <span style="color: #601200">48</span><span class="p">,</span> <span style="color: #601200">64</span><span class="p">,</span> <span style="color: #601200">96</span><span class="p">,</span> <span style="color: #601200">128</span><span class="p">,</span> <span style="color: #601200">192</span><span class="p">,</span> <span style="color: #601200">256</span> <span class="p">};</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">constexpr?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R263 KXmlGui</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24261">https://phabricator.kde.org/D24261</a></div></div><br /><div><strong>To: </strong>kossebau, dfaure<br /><strong>Cc: </strong>dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>