]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use the right name when adding a folder to Places with the context menu
authorFrank Reininghaus <frank78ac@googlemail.com>
Tue, 10 Jul 2012 06:23:14 +0000 (08:23 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Wed, 11 Jul 2012 22:40:09 +0000 (00:40 +0200)
Without this patch, the name of the parent folder was used for the entry
in the Places Panel. Will backport to the KDE/4.9 branch when the RC2
freeze is over.

Thanks to Daniel Kreuter for the patch!

BUG: 303157
FIXED-IN: 4.9.0
(cherry picked from commit 9940244ddd68fabf2979b9c0832105e43d725619)

src/dolphincontextmenu.cpp

index e1913a82fe3a6e9d08ac6fa06037b18d357179a7..bb26c7aaeda87ba77f9e241cfde6c4961ce90640 100644 (file)
@@ -295,7 +295,7 @@ void DolphinContextMenu::openItemContextMenu()
             const KUrl selectedUrl(m_fileInfo.url());
             if (selectedUrl.isValid()) {
                 PlacesItemModel model;
-                const QString text = m_mainWindow->activeViewContainer()->placesText();
+                const QString text = selectedUrl.fileName();
                 PlacesItem* item = model.createPlacesItem(text, selectedUrl);
                 model.appendItemToGroup(item);
             }