]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
[KStandardItemListWidget] Request the pixmap size we want and let the icon loader...
[dolphin.git] / src / dolphinviewcontainer.cpp
index 93e785f0d594f3e2234f98079c5148b00e27b1c3..dcec1db09783e7cec88dc68469324f8d58bf5a41 100644 (file)
@@ -428,7 +428,7 @@ QString DolphinViewContainer::placesText() const
     if (isSearchModeEnabled()) {
         text = i18n("Search for %1 in %2", m_searchBox->text(), m_searchBox->searchPath().fileName());
     } else {
-        text = url().fileName();
+        text = url().adjusted(QUrl::StripTrailingSlash).fileName();
         if (text.isEmpty()) {
             text = url().host();
         }
@@ -456,7 +456,7 @@ QString DolphinViewContainer::caption() const
     }
 
     KFilePlacesModel *placesModel = DolphinPlacesModelSingleton::instance().placesModel();
-    const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, url(), 1, Qt::MatchExactly);
+    const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, QUrl(url().adjusted(QUrl::StripTrailingSlash).toString(QUrl::FullyEncoded).append("/?")), 1, Qt::MatchRegExp);
 
     if (!matchedPlaces.isEmpty()) {
         return placesModel->text(matchedPlaces.first());
@@ -699,7 +699,7 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const QUrl& url)
                 app = browser;
                 if (app.startsWith('!')) {
                     // a literal command has been configured, remove the '!' prefix
-                    app = app.mid(1);
+                    app.remove(0, 1);
                 }
             }
         } else {
@@ -787,7 +787,7 @@ void DolphinViewContainer::showErrorMessage(const QString& msg)
 
 bool DolphinViewContainer::isSearchUrl(const QUrl& url) const
 {
-    return url.scheme().contains(QStringLiteral("search"));
+    return url.scheme().contains(QLatin1String("search"));
 }
 
 void DolphinViewContainer::saveViewState()