+ setWindowTitle(schemePrefix + path);
+ return;
+ }
+
+ const auto& matchedPlaces = s_placesModel.match(s_placesModel.index(0,0), KFilePlacesModel::UrlRole, url, 1, Qt::MatchExactly);
+
+ if (!matchedPlaces.isEmpty()) {
+ setWindowTitle(s_placesModel.text(matchedPlaces.first()));
+ return;
+ }
+
+ QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
+ if (fileName.isEmpty()) {
+ fileName = '/';
+ }
+
+ setWindowTitle(schemePrefix + fileName);
+}
+
+void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
+{
+#ifndef Q_OS_WIN
+ if (m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+ m_tearDownFromPlacesRequested = true;
+ m_terminalPanel->goHome();
+ // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged