]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Merge remote-tracking branch 'origin/Applications/16.12'
[dolphin.git] / src / dolphinmainwindow.cpp
index e5103fd42826065233244b2581927af1e802d392..1dcae7ec4955d096d6baafce4437f3c1aa3e13b4 100644 (file)
@@ -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();