]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/19.08'
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 6 Oct 2019 09:51:34 +0000 (11:51 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 6 Oct 2019 09:51:34 +0000 (11:51 +0200)
1  2 
src/dolphinviewcontainer.cpp

index 13b88f601f3d311afa55649004b96410c3aae864,536ab0fa80b4af0614e9cb9296cc9d2cab8b0595..41706288cdaede3a42aba4c591693200c882e640
@@@ -385,6 -385,9 +385,9 @@@ bool DolphinViewContainer::isFilterBarV
  
  void DolphinViewContainer::setSearchModeEnabled(bool enabled)
  {
+     m_searchBox->setVisible(enabled);
+     m_navigatorWidget->setVisible(!enabled);
      if (enabled) {
          const QUrl& locationUrl = m_urlNavigator->locationUrl();
          m_searchBox->fromSearchUrl(locationUrl);
          return;
      }
  
-     m_searchBox->setVisible(enabled);
-     m_navigatorWidget->setVisible(!enabled);
      if (!enabled) {
          m_view->setViewPropertiesContext(QString());
  
      }
  
      m_searchModeEnabled = enabled;
 +
 +    emit searchModeEnabledChanged(enabled);
  }
  
  bool DolphinViewContainer::isSearchModeEnabled() const
@@@ -458,7 -456,7 +458,7 @@@ QString DolphinViewContainer::caption(
      }
  
      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());
@@@ -701,7 -699,7 +701,7 @@@ void DolphinViewContainer::slotUrlNavig
                  app = browser;
                  if (app.startsWith('!')) {
                      // a literal command has been configured, remove the '!' prefix
 -                    app = app.mid(1);
 +                    app.remove(0, 1);
                  }
              }
          } else {
@@@ -789,7 -787,7 +789,7 @@@ void DolphinViewContainer::showErrorMes
  
  bool DolphinViewContainer::isSearchUrl(const QUrl& url) const
  {
 -    return url.scheme().contains(QStringLiteral("search"));
 +    return url.scheme().contains(QLatin1String("search"));
  }
  
  void DolphinViewContainer::saveViewState()