┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-05-28 20:48:40 +0000
committerPeter Penz <[email protected]>2008-05-28 20:48:40 +0000
commitd326c746bc8a475370bfbed9fc217d16501567b5 (patch)
treeb513b5baeb6f6e4e1c325bba005ea4a20de70073 /src/dolphinmainwindow.cpp
parente54e6a9cdbc0e37e7c81abcea4e69838cddabaa3 (diff)
Assure that tabs always have a text. If the file name is empty, use the protocol instead. This fixes the issue that for "trash://" no text is shown in the tab.
svn path=/trunk/KDE/kdebase/apps/; revision=813844
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 21ef3a984..85ff9f7f5 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -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() :