┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-10-07 20:29:18 +0000
committerPeter Penz <[email protected]>2008-10-07 20:29:18 +0000
commit0ee9ee0ea801c3d427b263153cfb20db041ec727 (patch)
treebfef6fb38ddaf3b46b54b085bc877c3a4e2f8511 /src/dolphinviewcontainer.cpp
parentf0b8e6518506c7d3b8d2beb2b391d6f4301608cf (diff)
If an URL cannot be listed, just let the view and the panels show the last listable URL. This prevents having an empty view and empty panels when typing a wrong URL.
BUG: 170695 svn path=/trunk/KDE/kdebase/apps/; revision=868984
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
-rw-r--r--src/dolphinviewcontainer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 99ff253c2..89ed54aca 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -350,7 +350,13 @@ void DolphinViewContainer::activate()
void DolphinViewContainer::restoreView(const KUrl& url)
{
- m_view->updateView(url, m_urlNavigator->savedRootUrl());
+ if (url.protocol().isEmpty()) {
+ // 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());
+ }
}
void DolphinViewContainer::saveRootUrl(const KUrl& url)