mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
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
This commit is contained in:
parent
2a7090728b
commit
996f8520e7
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue