diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-10-10 15:09:48 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-10-21 13:45:45 +0200 |
| commit | 5dd5eaf08da4b7d11e53c90096c2ea0e6a19e840 (patch) | |
| tree | 8b2b1e11ecb6cbb849aff34c72beb02ef715f116 /src/dolphinviewcontainer.cpp | |
| parent | 4d6cd761d8987adee511546f644ecf5f357148ad (diff) | |
Allow home directories with non-local file paths.
Paths like file:/home/me work now instead of showing
an error message.
BUG: 352743
BUG: 353550
FIXED-IN: 15.08.3
REVIEW: 125586
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 8fea3ba9d..6ceb18d6f 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -39,6 +39,7 @@ #ifdef KActivities_FOUND #endif +#include "global.h" #include "dolphin_generalsettings.h" #include "filterbar/filterbar.h" #include "search/dolphinsearchbox.h" @@ -77,7 +78,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : const GeneralSettings* settings = GeneralSettings::self(); m_urlNavigator->setUrlEditable(settings->editableUrl()); m_urlNavigator->setShowFullPath(settings->showFullPath()); - m_urlNavigator->setHomeUrl(QUrl::fromLocalFile(settings->homeUrl())); + m_urlNavigator->setHomeUrl(Dolphin::homeUrl()); KUrlComboBox* editor = m_urlNavigator->editor(); editor->setCompletionMode(KCompletion::CompletionMode(settings->urlCompletionMode())); @@ -304,7 +305,7 @@ void DolphinViewContainer::readSettings() // settings of the URL navigator and the filterbar. m_urlNavigator->setUrlEditable(GeneralSettings::editableUrl()); m_urlNavigator->setShowFullPath(GeneralSettings::showFullPath()); - m_urlNavigator->setHomeUrl(QUrl::fromLocalFile(GeneralSettings::homeUrl())); + m_urlNavigator->setHomeUrl(Dolphin::homeUrl()); setFilterBarVisible(GeneralSettings::filterBar()); } @@ -340,7 +341,7 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled) // started with a search-URL, the home URL is used as fallback. QUrl url = m_searchBox->searchPath(); if (url.isEmpty() || !url.isValid() || isSearchUrl(url)) { - url = QUrl::fromLocalFile(GeneralSettings::self()->homeUrl()); + url = Dolphin::homeUrl(); } m_urlNavigator->setLocationUrl(url); } |
