┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincontextmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphincontextmenu.cpp')
-rw-r--r--src/dolphincontextmenu.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index af283cf00..0830d4b8b 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -427,16 +427,11 @@ void DolphinContextMenu::addShowMenuBarAction()
bool DolphinContextMenu::placeExists(const QUrl& url) const
{
- PlacesItemModel model;
-
- const int count = model.count();
- for (int i = 0; i < count; ++i) {
- const QUrl placeUrl = model.placesItem(i)->url();
- if (placeUrl.matches(url, QUrl::StripTrailingSlash)) {
- return true;
- }
- }
-
+ // Creating up a PlacesItemModel to find out if 'url' is one of the Places
+ // can be expensive because the model asks Solid for the devices which are
+ // available, which can take some time.
+ // TODO: Consider restoring this check if the handling of Places and devices
+ // will be decoupled in the future.
return false;
}