<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/D23356">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/D23356#inline-131894">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:23</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: #304a96">#include</span> <span class="cpf"><QDebug></span><span style="color: #304a96"></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">#include</span> <span class="cpf"><QGuiApplication></span><span style="color: #304a96"></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Unused</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/D23356#inline-131891">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:58</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">QModelIndex</span> <span class="n">index</span> <span style="color: #aa2211">=</span> <span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">index</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span style="color: #601200">0</span><span class="p">,</span> <span class="n">QModelIndex</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">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">TaskManager</span><span style="color: #aa2211">::</span><span class="n">AbstractTasksModel</span><span style="color: #aa2211">::</span><span class="n">IsWindow</span><span class="p">).</span><span class="n">toBool</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">continue</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;">attachPidToTMIndex</tt> already checks for <tt style="background: #ebebeb; font-size: 13px;">IsWindow</tt> unless you want to save a pointless <tt style="background: #ebebeb; font-size: 13px;">AppPid</tt> call</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/D23356#inline-131887">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:72</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">if</span> <span class="p">(</span><span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">rowCount</span><span class="p">()</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</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">updateRows</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">,</span> <span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">rowCount</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <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;">rowCount() - 1</tt> because you go <tt style="background: #ebebeb; font-size: 13px;">i <= last</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/D23356#inline-131888">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:77</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">connect</span><span class="p">(</span><span class="n">m_model</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">QAbstractItemModel</span><span style="color: #aa2211">::</span><span class="n">dataChanged</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">,</span> <span class="p">[</span><span class="n">updateRows</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> <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">roles</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DisplayRole</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">updateRows</span><span class="p">(</span><span class="n">topLeft</span><span class="p">.</span><span class="n">row</span><span class="p">(),</span> <span class="n">bottomRight</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;">Roles can potentially be empty indicating all roles are dirty?<br />
Also, what about <tt style="background: #ebebeb; font-size: 13px;">DecorationRole</tt>, in case it's window pixmap.</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/D23356#inline-131890">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:83</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">if</span> <span class="p">(</span><span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">rowCount</span><span class="p">()</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</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">updateRows</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">,</span> <span class="n">m_model</span><span style="color: #aa2211">-></span><span class="n">rowCount</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <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;">rowCount() - 1</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/D23356#inline-131893">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.cpp:99</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">m_titleAttribute</span><span style="color: #aa2211">-></span><span class="n">setData</span><span class="p">(</span><span class="n">process</span><span class="p">,</span> <span class="n">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</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">m_iconNameAttribute</span><span style="color: #aa2211">-></span><span class="n">setData</span><span class="p">(</span><span class="n">process</span><span class="p">,</span> <span class="n">index</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">Qt</span><span style="color: #aa2211">::</span><span class="n">DecorationRole</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This role is a <tt style="background: #ebebeb; font-size: 13px;">QIcon</tt>, potentially created from the window pixmap in case window mapping failed.<br />
Or is that what the "tiny mods in ProcessModel" is about?</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/D23356#inline-131895">View Inline</a><span style="color: #4b4d51; font-weight: bold;">taskmanager.h:24</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: #304a96">#include</span> <span class="cpf"><processcore/process_data_provider.h></span><span style="color: #304a96"></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">#include</span> <span class="cpf"><QModelIndex></span><span style="color: #304a96"></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Unused, forward-declare</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R106 KSysguard</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23356">https://phabricator.kde.org/D23356</a></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>broulik, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>