From b0737279cdc7e8fa67eeb6e5951bb26f655e350d Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 31 Jan 2010 21:20:59 +0000 Subject: [PATCH] Fix a regression introduced in one of the 4.4 RCs in KDE 4.4, bug 224204 (http / ftp URLs do not open web browser in KRunner). Pretty sure I'd tested it, but not thouroughly enough it appears. I will forwardport shortly. Patch reviewed by Marco Martin. CCBUG:224204 svn path=/branches/KDE/4.4/kdelibs/; revision=1083222 --- runnercontext.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runnercontext.cpp b/runnercontext.cpp index 2bf9bad0b..2a04c8f32 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -192,10 +192,15 @@ class RunnerContextPrivate : public QSharedData } else { KUrl url(term); QString correctCasePath; + // check for a normal URL first + if (KProtocolInfo::protocolClass(url.protocol()) == ":internet" && + url.hasHost()) { + type = RunnerContext::NetworkLocation; // check if we have a local network location first, otherwise assume a path, // but if a path doesn't have any slashes is a single word or // sentence: it's too ambiguous to be sure we're in a filesystem context - if (KProtocolInfo::protocolClass(url.protocol()) == ":local" && !url.isLocalFile()) { + } else if (KProtocolInfo::protocolClass(url.protocol()) == ":local" && + !url.isLocalFile()) { type = RunnerContext::NetworkLocation; } else if ((path.indexOf('/') != -1 || path.indexOf('\\') != -1) && correctPathCase(path, correctCasePath)) {