From 42ef318a9d1c454f96b60181d8231a59233720ea Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Thu, 18 Jul 2019 13:00:19 +0400 Subject: kioclient: Don't convert `:x:y` to `?line=x&column=y` for URLs starting with remote schemes. BUG: 408632 Test Plan: `kioclient5 exec http://localhost:9000` now works correctly. Subscribers: plasma-devel, #frameworks Differential Revision: https://phabricator.kde.org/D22525 --- kioclient/urlinfo.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kioclient/urlinfo.h b/kioclient/urlinfo.h index b9635c7..ebe0419 100644 --- a/kioclient/urlinfo.h +++ b/kioclient/urlinfo.h @@ -52,6 +52,15 @@ public: } /** + * if the path starts with http:// or any other scheme, except file:// + * we also don't want to do anything with URL + */ + if (!QUrl(pathOrUrl).isLocalFile()) { + url = QUrl::fromUserInput(pathOrUrl, QDir::currentPath(), QUrl::DefaultResolution); + return; + } + + /** * ok, the path as is, is no existing file, now, cut away :xx:yy stuff as cursor * this will make test:50 to test with line 50 */ -- cgit v1.1