Accept URLs that have no hostname (such as smb:/ and zeroconf:/) as

type NetworkLocation too.

This makes it possible to type zeroconf:/ in krunner and load the
associated program (Dolphin in my case), just like in KDE 3.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812822
This commit is contained in:
Thiago Macieira 2008-05-26 13:21:06 +00:00
parent f706960801
commit 3d0ddada81

View File

@ -88,7 +88,7 @@ class RunnerContext::Private : public QSharedData
type = Executable; type = Executable;
} else { } else {
KUrl url(term); KUrl url(term);
if (!url.protocol().isEmpty() && !url.host().isEmpty()) { if (!url.protocol().isEmpty()) {
type = NetworkLocation; type = NetworkLocation;
} else if (QFile::exists(path)) { } else if (QFile::exists(path)) {
QFileInfo info(path); QFileInfo info(path);