<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/124089/">https://git.reviewboard.kde.org/r/124089/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 13th, 2015, 7:28 p.m. UTC, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">startTimer is called many times so doing the connect every time is wrong, and the connect is already done before, so I don't understand this patch.
What problem is it supposed to fix?</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I was having an issue with Konsole on Plasma 5 (Kubuntu 15.04). When opening links in Konsole, Konsole would freeze and the link wouldn't open. In Konsole on Plasma 5, type out a link (like "https://www.kde.org"), right click on the link and click "Open Link." Konsole will freeze. This was reproducible for me, and--although I didn't see any other repots on the issue--I decided to investigate it and fix it. Adding this line resolved the issue.
The initial call comes from the konsole repository in the slot "UrlFilter::HotSpot::activate". actiate() then calls "new KRun(QUrl(url), activeWindow);"::</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">void</span> <span style="color: #008000; font-weight: bold">UrlFilter</span><span style="color: #666666">:</span><span style="color: #AA22FF">:HotSpot</span><span style="color: #666666">:</span><span style="color: #AA22FF">:activate</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QObject</span><span style="color: #666666">*</span> <span style="color: #008000; font-weight: bold">object</span><span style="color: #666666">)</span>
{
qDebug() <span style="color: #666666"><<</span> <span style="color: #BA2121">"Opening URL"</span> <span style="color: #666666"><<</span> object;
QString <span style="color: #008000; font-weight: bold">url</span> <span style="color: #666666">=</span> capturedTexts()<span style="color: #666666">.</span>first();
const UrlType kind <span style="color: #666666">=</span> urlType();
const QString<span style="color: #666666">&</span> actionName <span style="color: #666666">=</span> object <span style="color: #666666">?</span> object<span style="color: #666666">-></span>objectName() <span style="color: #666666">:</span> QString();
if (actionName <span style="color: #666666">==</span> <span style="color: #BA2121">"copy-action"</span>) <span style="border: 1px solid #FF0000">{</span>
QApplication<span style="color: #666666">::</span>clipboard()<span style="color: #666666">-></span>setText(<span style="color: #008000; font-weight: bold">url</span>);
return;
}
<span style="color: #008000; font-weight: bold">if</span> <span style="color: #666666">(!</span><span style="color: #008000; font-weight: bold">object</span> <span style="color: #666666">||</span> <span style="color: #008000; font-weight: bold">actionName</span> <span style="color: #666666">==</span> <span style="color: #BA2121">"open-action"</span><span style="color: #666666">)</span> {
if (kind <span style="color: #666666">==</span> StandardUrl) <span style="border: 1px solid #FF0000">{</span>
<span style="color: #666666">//</span> if the URL path does not include the protocol ( eg<span style="color: #666666">.</span> <span style="color: #BA2121">"www.kde.org"</span> ) then
<span style="color: #666666">//</span> prepend http<span style="color: #666666">://</span> ( eg<span style="color: #666666">.</span> <span style="color: #BA2121">"www.kde.org"</span> <span style="color: #666666">--></span> <span style="color: #BA2121">"http://www.kde.org"</span> )
if (<span style="color: #666666">!</span><span style="color: #008000; font-weight: bold">url</span><span style="color: #666666">.</span>contains(<span style="color: #BA2121">"://"</span>)) <span style="border: 1px solid #FF0000">{</span>
<span style="color: #008000; font-weight: bold">url</span><span style="color: #666666">.</span>prepend(<span style="color: #BA2121">"http://"</span>);
}
<span style="border: 1px solid #FF0000">}</span> <span style="color: #008000; font-weight: bold">else</span> <span style="color: #008000; font-weight: bold">if</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">kind</span> <span style="color: #666666">==</span> <span style="color: #008000; font-weight: bold">Email</span><span style="color: #666666">)</span> {
<span style="color: #008000; font-weight: bold">url</span><span style="color: #666666">.</span>prepend(<span style="color: #BA2121">"mailto:"</span>);
}
<span style="color: #008000; font-weight: bold">QWidget</span> <span style="color: #666666">*</span><span style="color: #008000; font-weight: bold">activeWindow</span> <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">QApplication</span><span style="color: #666666">:</span><span style="color: #AA22FF">:activeWindow</span><span style="color: #666666">();</span>
<span style="color: #008000; font-weight: bold">qDebug</span><span style="color: #666666">()</span> <span style="color: #666666"><<</span> <span style="color: #BA2121">"Launching KRun with "</span> <span style="color: #666666"><<</span> <span style="color: #008000; font-weight: bold">url</span> <span style="color: #666666"><<</span> <span style="color: #BA2121">", "</span> <span style="color: #666666"><<</span> <span style="color: #008000; font-weight: bold">activeWindow</span><span style="color: #666666">;</span>
<span style="color: #008000; font-weight: bold">new</span> <span style="color: #008000; font-weight: bold">KRun</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QUrl</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">url</span><span style="color: #666666">),</span> <span style="color: #008000; font-weight: bold">activeWindow</span><span style="color: #666666">);</span>
<span style="border: 1px solid #FF0000">}</span>
<span style="border: 1px solid #FF0000">}</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Or is the issue really in konsole? Should Konsole create a new instance of <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KRun()</code> and then call <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">k->init()</code>?</p></pre>
<br />
<p>- Jordan</p>
<br />
<p>On June 12th, 2015, 8:27 p.m. UTC, Jordan He wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Jordan He.</div>
<p style="color: grey;"><i>Updated June 12, 2015, 8:27 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Connected timeout before timer start.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/widgets/krun.cpp <span style="color: grey">(50660c0a0f103a03d7950aa1f65b60ff796d1825)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124089/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>