┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorArjun AK <[email protected]>2014-12-01 17:31:39 +0530
committerArjun AK <[email protected]>2014-12-01 17:31:39 +0530
commit1d7b3b8df525d72126c716c9809c058f481e873e (patch)
tree8e21bf2c05ba402afb5b961af3c8041c2fbdb3ed /src/dolphinmainwindow.cpp
parentde7eefeb7e61ad343ea5483b36a7a39518b48747 (diff)
Fix KUrl -> QUrl porting error
Trailing slashes should be removed before calling QUrl::filename(), else it will return an empty string. BUG: 341411 REVIEW: 121293
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 81aa1e810..526f80474 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -969,7 +969,11 @@ void DolphinMainWindow::setUrlAsCaption(const QUrl& url)
}
}
- const QString fileName = url.fileName().isEmpty() ? "/" : url.fileName();
+ QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
+ if (fileName.isEmpty()) {
+ fileName = '/';
+ }
+
caption.append(fileName);
setCaption(caption);