┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp3
-rw-r--r--src/dolphinviewcontainer.cpp8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 48278312f..20d130ed3 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -58,6 +58,7 @@
#include <kio/netaccess.h>
#include <kinputdialog.h>
#include <klocale.h>
+#include <kprotocolmanager.h>
#include <kmenu.h>
#include <kmenubar.h>
#include <kmessagebox.h>
@@ -200,7 +201,7 @@ void DolphinMainWindow::pasteIntoFolder()
void DolphinMainWindow::changeUrl(const KUrl& url)
{
- if (url.protocol().isEmpty()) {
+ if (!KProtocolManager::supportsListing(url)) {
// The URL navigator only checks for validity, not
// if the URL can be listed. An error message is
// shown due to DolphinViewContainer::restoreView().
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 89ed54aca..bed7d2758 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -350,12 +350,12 @@ void DolphinViewContainer::activate()
void DolphinViewContainer::restoreView(const KUrl& url)
{
- if (url.protocol().isEmpty()) {
+ if (KProtocolManager::supportsListing(url)) {
+ m_view->updateView(url, m_urlNavigator->savedRootUrl());
+ } else {
// The URL navigator only checks for validity, not
// if the URL can be listed.
- showErrorMessage(i18nc("@info:status", "Protocol not supported"));
- } else {
- m_view->updateView(url, m_urlNavigator->savedRootUrl());
+ showErrorMessage(i18nc("@info:status", "Protocol not supported"));
}
}