<table><tr><td style="">sitter 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/D23384">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/D23384#inline-142079">View Inline</a><span style="color: #4b4d51; font-weight: bold;">desktopexecparser.cpp:314</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">org</span><span style="color: #aa2211">::</span><span class="n">kde</span><span style="color: #aa2211">::</span><span class="n">KIOFuse</span> <span class="n">kiofuse_iface</span><span class="p">(</span><span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"org.kde.KIOFuse"</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">                                <span class="n">QStringLiteral</span><span class="p">(</span><span style="color: #766510">"/org/kde/KIOFuse"</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">                                <span class="n">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">align arguments with first argument. same in krun.cpp.</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/D23384#inline-142081">View Inline</a><span style="color: #4b4d51; font-weight: bold;">desktopexecparser.cpp:316</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">QDBusConnection</span><span style="color: #aa2211">::</span><span class="n">sessionBus</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">QList</span><span style="color: #aa2211"><</span><span class="n">QUrl</span><span style="color: #aa2211">></span> <span class="n">parsedUrls</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">QVector</span><span style="color: #aa2211"><</span><span class="n">QPair</span><span style="color: #aa2211"><</span><span class="n">QDBusPendingReply</span><span style="color: #aa2211"><</span><span class="n">QString</span><span style="color: #aa2211">></span><span class="p">,</span> <span class="n">QUrl</span><span style="color: #aa2211">>></span> <span class="n">replies</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Do we need this? Seems to me you could just append to d->url directly.</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/D23384#inline-142080">View Inline</a><span style="color: #4b4d51; font-weight: bold;">desktopexecparser.cpp:317</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">QList</span><span style="color: #aa2211"><</span><span class="n">QUrl</span><span style="color: #aa2211">></span> <span class="n">parsedUrls</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">QVector</span><span style="color: #aa2211"><</span><span class="n">QPair</span><span style="color: #aa2211"><</span><span class="n">QDBusPendingReply</span><span style="color: #aa2211"><</span><span class="n">QString</span><span style="color: #aa2211">></span><span class="p">,</span> <span class="n">QUrl</span><span style="color: #aa2211">>></span> <span class="n">replies</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">mx1</span><span class="p">.</span><span class="n">hasUrls</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;">There's nothing wrong with this. But wouldn't using <tt style="background: #ebebeb; font-size: 13px;">QHash<QDBusPendingReply<QString>, QUrl></tt> make for easier to read code all in all since you don't have to mess with pairs?</p>

<p style="padding: 0; margin: 8px;">Alternatively with a vector I'd still make a struct for the data</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);">struct MountRequest { QDBusPendingReply<QString> reply, QUrl url };
QVector<MountRequest> requests;
...
requests.push_back({ mountUrl(url), url });</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/D23384#inline-142075">View Inline</a><span style="color: #4b4d51; font-weight: bold;">desktopexecparser.cpp:319</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 style="color: #aa2211">!</span><span class="n">mx1</span><span class="p">.</span><span class="n">hasUrls</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">Q_FOREACH</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">QUrl</span> <span style="color: #aa2211">&</span><span class="n">url<span class="bright"></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">urls</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="n">QUrl</span> <span style="color: #aa2211">&</span><span style="color: #a0a000">url<span class="bright"></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">urls</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; ">            <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">url</span><span class="p">.</span><span class="n">isLocalFile</span><span class="p">()</span> <span style="color: #aa2211">&&</span> <span style="color: #aa2211">!</span><span class="n">hasSchemeHandler</span><span class="p">(</span><span class="n">url</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;">there should be a space after for.</p>

<p style="padding: 0; margin: 8px;">what happened to the constness (also in the loop below)</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/D23384#inline-142076">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kiofuseinterface.h:28</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"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="n">class</span> <span class="n">KIOCORE_EXPORT</span> <span style="color: #a0a000">KIOFuseInterface</span><span class="p">:</span> <span class="n">public</span> <span class="n">QDBusAbstractInterface</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;">I don't think this should be a public/exported class. It's purely for internal use within KIO. It has no reason to become part of the ABI IMHO. To that end it also shouldn't be part of ecm_generate_headers.</p>

<p style="padding: 0; margin: 8px;">I suppose this generated file could also be replaced with the actual xml and generated at build time instead?<br />
Manually editing generated files is a bit meh in general.</p>

<p style="padding: 0; margin: 8px;">To get the interface into both the core and widgets target I suppose you'd simply add it to both source lists.</p>

<p style="padding: 0; margin: 8px;">Does anyone else have an opinion on 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/D23384#inline-142077">View Inline</a><span style="color: #4b4d51; font-weight: bold;">krun.cpp:598</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">QList</span><span style="color: #aa2211"><</span><span class="n">QUrl</span><span style="color: #aa2211">></span> <span class="n">parsedUrls</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 class="n">QList</span><span style="color: #aa2211"><</span><span class="n">QUrl</span><span style="color: #aa2211">>::</span><span class="n">Iterator</span> <span class="n">it</span> <span style="color: #aa2211">=</span> <span class="n">urls</span><span class="p">.</span><span class="n">begin</span><span class="p">();</span> <span class="n">it</span> <span style="color: #aa2211">!=</span> <span class="n">urls</span><span class="p">.</span><span class="n">end</span><span class="p">();</span> <span style="color: #aa2211">++</span><span class="n">it</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">QUrl</span> <span class="n">url</span> <span style="color: #aa2211">=</span> <span style="color: #aa2211">*</span><span class="n">it</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Is there a reason you are not using a range based for loop here? <tt style="background: #ebebeb; font-size: 13px;">for (const QUrl &url : urls)</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/D23384#inline-142078">View Inline</a><span style="color: #4b4d51; font-weight: bold;">krun.cpp:605</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">KIO</span><span style="color: #aa2211">::</span><span class="n">DesktopExecParser</span><span style="color: #aa2211">::</span><span class="n">isProtocolInSupportedList</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">appSupportedProtocols</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">url</span><span class="p">.</span><span class="n">password</span><span class="p">().</span><span class="n">isEmpty</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;">That seems like a hack for a bug in VLC and also super opinionated and also somewhat unrelated to fuse? If an application says it supports %u/%U and a given protocol, we should expect it to be able to parse a valid rfc2396 URI I would think.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23384">https://phabricator.kde.org/D23384</a></div></div><br /><div><strong>To: </strong>feverfew, fvogt, davidedmundson, dfaure, ngraham<br /><strong>Cc: </strong>sitter, davidedmundson, kde-frameworks-devel, ngraham, LeGast00n, GB_2, michaelh, bruns<br /></div>