]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Don't use local URL for KMoreTool
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 5 May 2020 10:05:18 +0000 (12:05 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Tue, 5 May 2020 10:05:18 +0000 (12:05 +0200)
This method is called a billion times and spawns a blocking(!) StatJob.
KFind can search local URLs, too, so I don't see why this is necessary.
Either way, I'd rather have a non-KDE search tool broken than the app.
Ideally, I'd like this entire thing redone to use an async StatJob, if any.
Fwiw the KMoreTools in the free space bar doesn't use a local URL either.

BUG: 420911
FIXED-IN: 20.04.1

Differential Revision: https://phabricator.kde.org/D29442

src/dolphinmainwindow.cpp

index f88bc3f44f1ac2a4e24fb5b96b3a48c6ad82192a..7ad136fe738f02606b60263f7cc5bbe886605406 100644 (file)
@@ -956,7 +956,7 @@ QPointer<QAction> DolphinMainWindow::preferredSearchTool()
 {
     m_searchTools.clear();
     KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames(
-        &m_searchTools, { "files-find" }, QUrl::fromLocalFile(activeContainerLocalPath())
+        &m_searchTools, { "files-find" }, m_activeViewContainer->url()
     );
     QList<QAction*> actions = m_searchTools.actions();
     if (actions.isEmpty()) {