X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/bffb1c4d60694a63561e7063b8895d035ba52564..230fe13d1f:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e5103fd42..1dcae7ec4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -723,7 +723,7 @@ void DolphinMainWindow::handleUrl(const QUrl& url) } else if (KProtocolManager::supportsListing(url)) { // stat the URL to see if it is a dir or not m_lastHandleUrlStatJob = KIO::stat(url, KIO::HideProgressInfo); - if (m_lastHandleUrlStatJob->ui()) { + if (m_lastHandleUrlStatJob->uiDelegate()) { KJobWidgets::setWindow(m_lastHandleUrlStatJob, this); } connect(m_lastHandleUrlStatJob, &KIO::Job::result, @@ -961,13 +961,17 @@ void DolphinMainWindow::setUrlAsCaption(const QUrl& url) } } - QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName(); - if (fileName.isEmpty()) { - fileName = '/'; + if (GeneralSettings::showFullPathInTitlebar()) { + const QString path = url.adjusted(QUrl::StripTrailingSlash).path(); + caption.append(path); + } else { + QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName(); + if (fileName.isEmpty()) { + fileName = '/'; + } + caption.append(fileName); } - caption.append(fileName); - setWindowTitle(caption); } @@ -1404,6 +1408,7 @@ void DolphinMainWindow::refreshViews() const bool splitView = GeneralSettings::splitView(); m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView); updateSplitAction(); + setUrlAsCaption(activeViewContainer()->url()); } emit settingsChanged();