<table><tr><td style="">davidedmundson added a comment.</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2676" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Generally awesome.<br />
One major bug, rest are tiny comments.</p>
<p>Will give it a second review later, as it's a bit patch and I got tired :)</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D2676#inline-10494" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:175</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: #d0ffd0;"> <span style="color: #004012">property</span> <span style="color: #304a96">int</span> <span style="color: #aa4000">effectiveRows:</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa4000">var</span> <span style="color: #004012">columns</span> <span style="color: #aa2211">=</span> <span style="color: #304a96">Math</span><span class="p">.</span><span style="color: #004012">floor</span><span class="p">(</span><span style="color: #004012">repeater</span><span class="p">.</span><span style="color: #004012">count</span> <span style="color: #aa2211">/</span> <span style="color: #004012">pagerModel</span><span class="p">.</span><span style="color: #004012">layoutRows</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">add some readonly's over here.</p>
<p style="padding: 0; margin: 8px;">It's apparently marginally faster; plus it can make things a bit more readable</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/D2676#inline-10493" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">main.qml:402</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: #d0ffd0;"> <span style="color: #004012">pagerModel</span><span class="p">.</span><span style="color: #004012">refresh</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="p">}</span> <span style="color: #aa4000">else</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">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/D2676#inline-10502" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pagermodel.cpp:76</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: #d0ffd0;"><span style="color: #aa4000">int</span> <span class="n">PagerModel</span><span style="color: #aa2211">::</span><span class="n">Private</span><span style="color: #aa2211">::</span><span class="n">instanceCount</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="n">ActivityInfo</span> <span style="color: #aa2211">*</span><span class="n">PagerModel</span><span style="color: #aa2211">::</span><span class="n">Private</span><span style="color: #aa2211">::</span><span class="n">activityInfo</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">ActivityInfo</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span class="n">VirtualDesktopInfo</span> <span style="color: #aa2211">*</span><span class="n">PagerModel</span><span style="color: #aa2211">::</span><span class="n">Private</span><span style="color: #aa2211">::</span><span class="n">virtualDesktopInfo</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">VirtualDesktopInfo</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">you delete them in <br />
if (!instanceCount) in the dstror,</p>
<p style="padding: 0; margin: 8px;">but you're creating them statically.</p>
<p style="padding: 0; margin: 8px;">that will crash on create/remove/create and it's a bit weird.</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/D2676#inline-10504" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pagermodel.cpp:84</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: #d0ffd0;"> <span class="n">QObject</span><span style="color: #aa2211">::</span><span class="n">connect</span><span class="p">(</span><span class="n">activityInfo</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">ActivityInfo</span><span style="color: #aa2211">::</span><span class="n">currentActivityChanged</span><span class="p">,</span> <span class="n">q</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="p">[</span><span style="color: #aa4000">this</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;">this is effectively duped in refreshDatasSource()</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/D2676#inline-10503" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pagermodel.cpp:96</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: #d0ffd0;"> <span class="p">[</span><span style="color: #aa4000">this</span><span class="p">]()</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">desktopDown</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: #d0ffd0;"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'm a bit confused here.</p>
<p style="padding: 0; margin: 8px;">If VirtualDesktop changes you're resetting your own knowledge of if the desktop is shown or not. <br />
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/D2676#inline-10501" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pagermodel.cpp:250</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: #d0ffd0;"> <span class="n">d</span><span style="color: #aa2211">-></span><span class="n">windowModels</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">endResetModel</span><span class="p">();</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">emit countChanged in both places</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/D2676#inline-10497" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">pagermodel.cpp:429</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: #d0ffd0;"> <span style="color: #74777d">// Toggle the desktop.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">d</span><span style="color: #aa2211">-></span><span class="n">showDesktop</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span class="n">NETRootInfo</span> <span class="n">info</span><span class="p">(</span><span class="n">QX11Info</span><span style="color: #aa2211">::</span><span class="n">connection</span><span class="p">(),</span> <span style="color: #601200">0</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">this is a new feature?</p>
<p style="padding: 0; margin: 8px;">It doesn't work in the current version anyway.</p>
<p style="padding: 0; margin: 8px;">Note there is a DBus verison of showDashboard which is maybe sensible to use? It cuts out some of the X specific code.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>rPLASMADESKTOP Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2676" rel="noreferrer">https://phabricator.kde.org/D2676</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>hein, Plasma, davidedmundson<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>