diff options
| author | Kai Uwe Broulik <[email protected]> | 2017-01-03 09:46:43 +0100 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2017-01-03 09:46:43 +0100 |
| commit | 996f8520e7003326ade6ea96929dd41958ba308d (patch) | |
| tree | d0be77a7a7f286b38ee568d0a19f63f490afe528 /src/dolphincontextmenu.cpp | |
| parent | 2a7090728b8ef897a523712f89c917302f2c6532 (diff) | |
Explicitly pass iconNameForUrl when creating new places entry
Once KIO::iconNameForUrl returns special icons for standard paths (e.g. Video folder)
this will ensure when adding such a folder to places it will automatically get the proper icon.
Since KIO already depends on KBookmarks it can't depend the other way round, otherwise
this would have been fixed in KBookmarks directly.
Differential Revision: https://phabricator.kde.org/D3896
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index ed3f64379..666b81c8d 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -307,7 +307,7 @@ void DolphinContextMenu::openItemContextMenu() if (selectedUrl.isValid()) { PlacesItemModel model; const QString text = selectedUrl.fileName(); - PlacesItem* item = model.createPlacesItem(text, selectedUrl); + PlacesItem* item = model.createPlacesItem(text, selectedUrl, KIO::iconNameForUrl(selectedUrl)); model.appendItemToGroup(item); model.saveBookmarks(); } @@ -373,7 +373,8 @@ void DolphinContextMenu::openViewportContextMenu() if (container->url().isValid()) { PlacesItemModel model; PlacesItem* item = model.createPlacesItem(container->placesText(), - container->url()); + container->url(), + KIO::iconNameForUrl(container->url())); model.appendItemToGroup(item); model.saveBookmarks(); } |
