<table><tr><td style="">davidedmundson requested changes to this revision.<br />davidedmundson added a comment.<br />This revision now requires changes to proceed.
</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/D10461">View Revision</a></tr></table><br /><div><div><p>Fundamental design seems fine.</p>
<p>It's a massive patchset, I'm not sure I've got my head round all of it yet, I might take a second round when these minor things are addressed.</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/D10461#inline-53683">View Inline</a><span style="color: #4b4d51; font-weight: bold;">actions.cpp:62</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">QDBusPendingReply</span><span style="color: #aa2211"><</span><span class="n">GMenuActionMap</span><span style="color: #aa2211">></span> <span class="n">reply</span> <span style="color: #aa2211">=</span> <span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">().</span><span class="n">asyncCall</span><span class="p">(</span><span class="n">msg</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">QDBusPendingCallWatcher</span><span class="p">(</span><span class="n">reply</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 class="n">connect</span><span class="p">(</span><span class="n">watcher</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">QDBusPendingCallWatcher</span><span style="color: #aa2211">::</span><span class="n">finished</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">,</span> <span class="p">[</span><span style="color: #aa4000">this</span><span class="p">](</span><span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</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;">leak</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/D10461#inline-53684">View Inline</a><span style="color: #4b4d51; font-weight: bold;">actions.cpp:119</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">QDBusPendingReply</span><span style="color: #aa2211"><</span><span style="color: #aa4000">void</span><span style="color: #aa2211">></span> <span class="n">reply</span> <span style="color: #aa2211">=</span> <span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">().</span><span class="n">asyncCall</span><span class="p">(</span><span class="n">msg</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">QDBusPendingCallWatcher</span><span class="p">(</span><span class="n">reply</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 class="n">connect</span><span class="p">(</span><span class="n">watcher</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">QDBusPendingCallWatcher</span><span style="color: #aa2211">::</span><span class="n">finished</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">,</span> <span class="p">[</span><span style="color: #aa4000">this</span><span class="p">,</span> <span class="n">name</span><span class="p">](</span><span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</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;">leak</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/D10461#inline-53686">View Inline</a><span style="color: #4b4d51; font-weight: bold;">gmenudbusmenuproxy.desktop:7</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);">OnlyShowIn=KDE;
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Why 0?</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/D10461#inline-53687">View Inline</a><span style="color: #4b4d51; font-weight: bold;">icons.cpp: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 class="n">QString</span> <span class="n">Icons</span><span style="color: #aa2211">::</span><span class="n">actionIcon</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QString</span> <span style="color: #aa2211">&</span><span class="n">actionName</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;">does this list come from anywhere?</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/D10461#inline-53689">View Inline</a><span style="color: #4b4d51; font-weight: bold;">menu.cpp:98</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">qCWarning</span><span class="p">(</span><span class="n">DBUSMENUPROXY</span><span class="p">)</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"Got an empty menu for"</span> <span style="color: #aa2211"><<</span> <span class="n">id</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"on"</span> <span style="color: #aa2211"><<</span> <span class="n">m_serviceName</span> <span style="color: #aa2211"><<</span> <span style="color: #766510">"at"</span> <span style="color: #aa2211"><<</span> <span class="n">m_objectPath</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</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;">watcher leaked</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/D10461#inline-53690">View Inline</a><span style="color: #4b4d51; font-weight: bold;">menu.cpp:127</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">QDBusPendingReply</span><span style="color: #aa2211"><</span><span style="color: #aa4000">void</span><span style="color: #aa2211">></span> <span class="n">reply</span> <span style="color: #aa2211">=</span> <span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">().</span><span class="n">asyncCall</span><span class="p">(</span><span class="n">msg</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">QDBusPendingCallWatcher</span><span class="p">(</span><span class="n">reply</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 class="n">connect</span><span class="p">(</span><span class="n">watcher</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">QDBusPendingCallWatcher</span><span style="color: #aa2211">::</span><span class="n">finished</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">,</span> <span class="p">[</span><span style="color: #aa4000">this</span><span class="p">,</span> <span class="n">ids</span><span class="p">](</span><span class="n">QDBusPendingCallWatcher</span> <span style="color: #aa2211">*</span><span class="n">watcher</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;">and again...</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/D10461#inline-53696">View Inline</a><span style="color: #4b4d51; font-weight: bold;">menuproxy.cpp:195</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">applicationMenuObjectPath</span><span class="p">.</span><span class="n">isEmpty</span><span class="p">()</span> <span style="color: #aa2211">&&</span> <span class="n">menuBarObjectPath</span><span class="p">.</span><span class="n">isEmpty</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">return</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">are these always set before the window is created?</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/D10461#inline-53691">View Inline</a><span style="color: #4b4d51; font-weight: bold;">menuproxy.cpp:249</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">// FIXME Check type</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: #74777d">/*propertyReply->type == 392 && */</span><span class="n">propertyReply</span><span style="color: #aa2211">-></span><span class="n">format</span> <span style="color: #aa2211">==</span> <span style="color: #601200">8</span> <span style="color: #aa2211">&&</span> <span class="n">propertyReply</span><span style="color: #aa2211">-></span><span class="n">value_len</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 style="color: #aa4000">const</span> <span style="color: #aa4000">char</span> <span style="color: #aa2211">*</span><span class="n">data</span> <span style="color: #aa2211">=</span> <span class="p">(</span><span style="color: #aa4000">const</span> <span style="color: #aa4000">char</span> <span style="color: #aa2211">*</span><span class="p">)</span> <span class="n">xcb_get_property_value</span><span class="p">(</span><span class="n">propertyReply</span><span class="p">.</span><span class="n">data</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">what's this 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/D10461#inline-53700">View Inline</a><span style="color: #4b4d51; font-weight: bold;">window.cpp:92</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 style="color: #aa2211">!</span><span class="n">m_applicationObjectPath</span><span class="p">.</span><span class="n">isEmpty</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">m_applicationActions</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">Actions</span><span class="p">(</span><span class="n">m_serviceName</span><span class="p">,</span> <span class="n">m_applicationObjectPath</span><span class="p">);</span>
</div><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_applicationActions</span><span class="p">,</span> <span style="color: #aa2211">&</span><span class="n">Actions</span><span style="color: #aa2211">::</span><span class="n">actionsChanged</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">,</span> <span class="p">[</span><span style="color: #aa4000">this</span><span class="p">](</span><span style="color: #aa4000">const</span> <span class="n">QStringList</span> <span style="color: #aa2211">&</span><span class="n">dirtyActions</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;">who owns this?</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/D10461#inline-53693">View Inline</a><span style="color: #4b4d51; font-weight: bold;">window.cpp:357</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">new</span> <span class="n">DbusmenuAdaptor</span><span class="p">(</span><span style="color: #aa4000">this</span><span class="p">);</span> <span style="color: #74777d">// do this before registering the object?</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I think it's safe, you'd have definitely added it before we process someone introspecting the path.</p>
<p style="padding: 0; margin: 8px;">But why write it one way round and add a question when we can just move it.</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/D10461#inline-53699">View Inline</a><span style="color: #4b4d51; font-weight: bold;">window.cpp:606</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 style="color: #aa2211">!</span><span class="n">accel</span><span class="p">.</span><span class="n">isEmpty</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: #74777d">// TODO replace "+" by "plus" and "-" by "minus"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">shortcut</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">accel</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">so do so?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10461">https://phabricator.kde.org/D10461</a></div></div><br /><div><strong>To: </strong>broulik, Plasma, mart, davidedmundson<br /><strong>Cc: </strong>davidedmundson, mart, rk, rilian, mtallur, ngraham, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>