]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
don't clear the selection when the view gets inactive
[dolphin.git] / src / dolphinmainwindow.cpp
index 21ef3a984a386fc67266e7f024e6da0beb6a7158..85ff9f7f5eb51d8e44da87fbf92a03d6c34ba4eb 100644 (file)
@@ -1188,7 +1188,16 @@ void DolphinMainWindow::updateSplitAction()
 
 QString DolphinMainWindow::tabName(const KUrl& url) const
 {
-    return url.equals(KUrl("file:///")) ? "/" : url.fileName();
+    QString name;
+    if (url.equals(KUrl("file:///"))) {
+        name = "/";
+    } else {
+        name = url.fileName();
+        if (name.isEmpty()) {
+            name = url.protocol();
+        }
+    }
+    return name;
 }
 
 DolphinMainWindow::UndoUiInterface::UndoUiInterface() :