m_statusBar, &DolphinStatusBar::setText);
connect(m_view, &DolphinView::operationCompletedMessage,
m_statusBar, &DolphinStatusBar::setText);
+ connect(m_view, &DolphinView::statusBarTextChanged,
+ m_statusBar, &DolphinStatusBar::setDefaultText);
+ connect(m_view, &DolphinView::statusBarTextChanged,
+ m_statusBar, &DolphinStatusBar::resetToDefaultText);
connect(m_statusBar, &DolphinStatusBar::stopPressed,
this, &DolphinViewContainer::stopDirectoryLoading);
connect(m_statusBar, &DolphinStatusBar::zoomLevelChanged,
}
KFilePlacesModel *placesModel = DolphinPlacesModelSingleton::instance().placesModel();
- const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, QUrl(url().adjusted(QUrl::StripTrailingSlash).toString(QUrl::FullyEncoded).append("/?")), 1, Qt::MatchRegExp);
+ const QString pattern = url().adjusted(QUrl::StripTrailingSlash).toString(QUrl::FullyEncoded).append("/?");
+ const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, QRegularExpression::anchoredPattern(pattern), 1, Qt::MatchRegularExpression);
if (!matchedPlaces.isEmpty()) {
return placesModel->text(matchedPlaces.first());
void DolphinViewContainer::updateStatusBar()
{
m_statusBarTimestamp.start();
-
- const QString text = m_view->statusBarText();
- m_statusBar->setDefaultText(text);
- m_statusBar->resetToDefaultText();
+ m_view->requestStatusBarText();
}
void DolphinViewContainer::updateDirectoryLoadingProgress(int percent)
m_view->markUrlAsCurrent(url); // makes the item scroll into view
}
+void DolphinViewContainer::disableUrlNavigatorSelectionRequests()
+{
+ disconnect(m_urlNavigator.get(), &KUrlNavigator::urlSelectionRequested,
+ this, &DolphinViewContainer::slotUrlSelectionRequested);
+}
+
+void DolphinViewContainer::enableUrlNavigatorSelectionRequests()
+{
+ connect(m_urlNavigator.get(), &KUrlNavigator::urlSelectionRequested,
+ this, &DolphinViewContainer::slotUrlSelectionRequested);
+}
+
void DolphinViewContainer::redirect(const QUrl& oldUrl, const QUrl& newUrl)
{
Q_UNUSED(oldUrl)