<table><tr><td style="">broulik 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/D26934">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/D26934#inline-161275">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:182</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 class="n">AddScriptDialog</span> <span class="n">addDialog</span><span class="p">(</span><span style="color: #aa4000">this</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">addDialog</span><span class="p">.</span><span class="n">exec</span><span class="p">()</span> <span style="color: #aa2211">!=</span> <span class="n">QDialog</span><span style="color: #aa2211">::</span><span class="n">Accepted</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #aa4000">return</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">In preparation for a move to QML, can we please not <tt style="background: #ebebeb; font-size: 13px;">exec()</tt></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/D26934#inline-161276">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:192</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 class="n">QTreeWidgetItem</span><span style="color: #aa2211">*</span> <span class="n">widgetItem</span> <span style="color: #aa2211">=</span> <span class="n">widget</span><span style="color: #aa2211">-></span><span class="n">listCMD</span><span style="color: #aa2211">-></span><span class="n">currentItem</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">widgetItem</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #aa4000">return</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style</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/D26934#inline-161277">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:231</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">QUrl</span></span><span class="bright"> </span><span class="n"><span class="bright">path</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">scriptItem</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">fileName</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">path</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">setScheme</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">QStringLiteral</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">"file"</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">m_scriptItem</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">takeChild</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_scriptItem</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">indexOfChild</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"> </span><span class="n"><span class="bright">scriptItem</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">Q_UNUSED</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">roles</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">Q_UNUSED</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">bottomRight</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;">Don't always ignore those ranges, we want to handle this model stuff properly</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/D26934#inline-161278">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:241</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 class="n">QTreeWidgetItem</span> <span style="color: #aa2211">*</span><span class="n">item</span> <span style="color: #aa2211">=</span> <span class="n">m_scriptItem</span><span style="color: #aa2211">-></span><span class="n">child</span><span class="p">(</span><span class="n">topLeft</span><span class="p">.</span><span class="n">row</span><span class="p">()</span> <span style="color: #aa2211">-</span> <span class="n">m_programItem</span><span style="color: #aa2211">-></span><span class="n">childCount</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">ScriptStartItem</span> <span style="color: #aa2211">*</span><span class="n">scriptEntry</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">ScriptStartItem</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">item</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">updateScriptStartItem</span><span class="p">(</span><span class="n">scriptEntry</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">command</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">fileName</span><span class="p">);</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;">qobject_cast</tt></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/D26934#inline-161279">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:261</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: #aa4000">const</span> <span class="n">QString</span> <span class="n">fileName</span> <span style="color: #aa2211">=</span> <span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">data</span><span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">AutostartModel</span><span style="color: #aa2211">::</span><span class="n">Roles</span><span style="color: #aa2211">::</span><span class="n">FileName</span><span class="p">).</span><span class="n">toString</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">KFileItem</span> <span class="n">kfi</span> <span style="color: #aa2211">=</span> <span class="n">KFileItem</span><span class="p">(</span><span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">fileName</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">kfi</span><span class="p">.</span><span class="n">setDelayedMimeTypes</span><span class="p">(</span><span style="color: #304a96">true</span><span class="p">);</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;">KFileItem kfi(QUrl::fromLocalFile(fileName));</tt></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/D26934#inline-161273">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:49</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">Autostart</span><span style="color: #aa2211">::</span><span class="n">Autostart</span><span class="p">(</span> <span class="n">QWidget</span><span style="color: #aa2211">*</span> <span class="n">parent</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QVariantList</span><span style="color: #aa2211">&</span> <span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span style="color: #aa2211">:</span> <span class="n">KCModule</span><span class="p">(</span><span class="n">parent</span> <span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa2211">:</span> <span class="n">KCModule</span><span class="p">(</span><span class="n">parent</span> <span class="p">)<span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">m_model</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">new</span></span><span class="bright"> </span><span class="n"><span class="bright">AutostartModel</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;">Put on new line</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/D26934#inline-161267">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:100</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">if</span> <span class="p">(</span> <span class="n">entry</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">bool</span> <span class="bright"></span><span class="n"><span class="bright">dis</span>able</span> <span style="color: #aa2211">=</span> <span class="p">(</span> <span class="n">item</span><span style="color: #aa2211">-></span><span class="n">checkState</span><span class="p">(</span> <span class="n">col</span> <span class="p">)</span> <span style="color: #aa2211">==</span> <span class="n">Qt</span><span style="color: #aa2211">::<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">Unc</span>hecked</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">KDesktopFile</span></span><span class="bright"> </span><span style="color: #004012"><span class="bright">kc</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">entry</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">fileName</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">path</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 style="color: #aa4000">bool</span> <span class="bright"></span><span class="n"><span class="bright">en</span>able<span class="bright">d</span></span> <span style="color: #aa2211">=</span> <span class="p">(</span> <span class="n">item</span><span style="color: #aa2211">-></span><span class="n">checkState</span><span class="p">(</span> <span class="n">col</span> <span class="p">)</span> <span style="color: #aa2211">==</span> <span class="n">Qt</span><span style="color: #aa2211">::<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">C</span>hecked</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">m_model</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">setData</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">indexFromWidget</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">item</span></span><span class="bright"></span><span class="p"><span class="bright">),</span></span><span class="bright"> </span><span class="n"><span class="bright">enabled</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">AutostartModel</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">Roles</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">Enabled</span></span><span class="p">);</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;">const bool</tt></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/D26934#inline-161268">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:102</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">KDesktopFile</span></span><span class="bright"> </span><span style="color: #004012"><span class="bright">kc</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">entry</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">fileName</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">path</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">KConfigGroup</span></span><span class="bright"> </span><span class="n"><span class="bright">grp</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">kc</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">desktopGroup</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">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"> </span><span class="n"><span class="bright">grp</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">hasKey</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">"Hidden"</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 style="color: #aa2211"><span class="bright">!</span></span><span class="bright"></span><span class="n"><span class="bright">dis</span>able<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(251, 175, 175, .7);">                <span class="n">grp</span><span class="p">.</span><span class="n">deleteEntry</span><span class="p">(</span> <span style="color: #766510">"Hidden"</span> <span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <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">m_model</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">setData</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">indexFromWidget</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">item</span></span><span class="bright"></span><span class="p"><span class="bright">),</span></span><span class="bright"> </span><span class="n"><span class="bright">enabled</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">AutostartModel</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">Roles</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">Enabled</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 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 class="n"><span class="bright">enabled</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">item</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">setText</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"> </span><span class="n"><span class="bright">COL_STATUS</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">i18nc</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">"The program will be run"</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">"En</span>able<span class="bright">d"</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></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style:</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);">if (enabled) {
    ...
}</pre></div></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/D26934#inline-161269">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.cpp:210</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 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 class="n"><span class="bright">result</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">QDialog</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">Accepted</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(251, 175, 175, .7);">    <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 class="n"><span class="bright">addDialog</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">symLink</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">KIO</span><span style="color: #aa2211">::</span><span class="n">link</span><span class="p">(</span><span class="n">addDialog</span><span style="color: #aa2211">-></span><span class="n">importUrl</span><span class="p">(),</span> <span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">m_paths</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">]));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">else</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">KIO</span><span style="color: #aa2211">::</span><span class="n">copy</span><span class="p">(</span><span class="n">addDialog</span><span style="color: #aa2211">-></span><span class="n">importUrl</span><span class="p">(),</span> <span class="n">QUrl</span><span style="color: #aa2211">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">m_paths</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">]));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">
</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">QModelIndex</span></span><span class="bright"> </span><span class="n"><span class="bright">idx</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_model</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">index</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">first</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>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">You probably want to loop</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);">for (int i = first; i <= last; ++i) {</pre></div></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/D26934#inline-161261">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.h:64</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: #aa4000">void</span> <span style="color: #004012">slotRowInserted</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: #aa2211">&</span><span class="n">parent</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">first</span><span class="p">,</span> <span style="color: #aa4000">int</span> <span class="n">last</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">void</span> <span style="color: #004012">slotDatachanged</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: #aa2211">&</span><span class="n">topLeft</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: #aa2211">&</span><span class="n">bottomRight</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QVector</span><span style="color: #aa2211"><</span><span style="color: #aa4000">int</span><span style="color: #aa2211">></span> <span style="color: #aa2211">&</span><span class="n">roles</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Capitalize <tt style="background: #ebebeb; font-size: 13px;">Changed</tt></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/D26934#inline-161260">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostart.h:67</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: #a0a000">private</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="n">QTreeWidgetItem</span> <span style="color: #aa2211">*<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">m_programItem</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">m_scriptItem</span></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">QString</span></span><span class="bright"> </span><span class="n"><span class="bright">m_desktopPath</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">ModelIndex</span></span><span class="bright"> </span><span class="n"><span class="bright">indexFromWidget</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">Q</span>TreeWidgetItem</span> <span style="color: #aa2211">*<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">widget</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;"><tt style="background: #ebebeb; font-size: 13px;">const</tt></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/D26934#inline-161281">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostartmodel.cpp:176</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">//add scripts, skips first value</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> <span class="n">i</span> <span style="color: #aa2211">=</span> <span style="color: #601200">1</span><span class="p">;</span> <span class="n">i</span> <span style="color: #aa2211"><</span> <span class="n">listPath</span><span class="p">().</span><span class="n">length</span><span class="p">();</span> <span class="n">i</span><span style="color: #aa2211">++</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;">but why?</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/D26934#inline-161283">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostartmodel.cpp:261</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: #aa4000">int</span> <span class="n">dirty</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(151, 234, 151, .6);">    <span class="n">AutostartEntry</span> <span style="color: #aa2211">&</span><span class="n">entry</span> <span style="color: #aa2211">=</span> <span class="n">m_entries</span><span class="p">[</span><span class="n">index</span><span class="p">.</span><span class="n">row</span><span class="p">()];</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;">bool</tt></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/D26934#inline-161284">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostartmodel.cpp:291</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 class="n">grp</span><span class="p">.</span><span class="n">deleteEntry</span><span class="p">(</span> <span style="color: #766510">"Hidden"</span> <span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="p">}</span><span style="color: #aa4000">else</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span class="n">grp</span><span class="p">.</span><span class="n">writeEntry</span><span class="p">(</span><span style="color: #766510">"Hidden"</span><span class="p">,</span> <span style="color: #aa2211">!</span><span class="n">entry</span><span class="p">.</span><span class="n">enabled</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Coding style: <tt style="background: #ebebeb; font-size: 13px;">} else {</tt></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/D26934#inline-161280">View Inline</a><span style="color: #4b4d51; font-weight: bold;">autostartmodel.h:52</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: #aa4000">enum</span> <span class="n">Roles</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">DisplayRole</span> <span style="color: #aa2211">=</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DisplayRole</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">Command</span> <span style="color: #aa2211">=</span> <span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">UserRole</span> <span style="color: #aa2211">+</span> <span style="color: #601200">1</span><span class="p">,</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Why not just use <tt style="background: #ebebeb; font-size: 13px;">Qt::DisplayRole</tt>?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>BRANCH</strong><div><div>D26934</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26934">https://phabricator.kde.org/D26934</a></div></div><br /><div><strong>To: </strong>meven, mlaurent, ervin, Plasma, broulik, bport, crossi<br /><strong>Cc: </strong>alex, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>