┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2026-01-22 16:15:09 +0100
committerMéven Car <[email protected]>2026-01-22 16:27:11 +0100
commit1acd0dfe09a34817d8daf58db2c53b2262eec7b7 (patch)
tree94cab48dc8ad7c79c4fed016b8d0935c4e8dc3e5 /src/search
parenta403c0c6058d5064b8cc439edb41eb52ae384046 (diff)
clang-tidy: avoid copy, use const references
Diffstat (limited to 'src/search')
-rw-r--r--src/search/chip.cpp2
-rw-r--r--src/search/dolphinquery.cpp2
-rw-r--r--src/search/dolphinquery.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/search/chip.cpp b/src/search/chip.cpp
index f478a480f..69c166c9d 100644
--- a/src/search/chip.cpp
+++ b/src/search/chip.cpp
@@ -15,7 +15,7 @@ using namespace Search;
ChipBase::ChipBase(std::shared_ptr<const DolphinQuery> dolphinQuery, QWidget *parent)
: QWidget{parent}
- , UpdatableStateInterface{dolphinQuery}
+ , UpdatableStateInterface{std::move(dolphinQuery)}
{
m_removeButton = new QToolButton{this};
m_removeButton->setText(i18nc("@action:button", "Remove Filter"));
diff --git a/src/search/dolphinquery.cpp b/src/search/dolphinquery.cpp
index c0967c8de..4b7627846 100644
--- a/src/search/dolphinquery.cpp
+++ b/src/search/dolphinquery.cpp
@@ -35,7 +35,7 @@ bool Search::isSupportedSearchScheme(const QString &urlScheme)
bool g_testMode = false;
-bool Search::isIndexingEnabledIn(QUrl directory)
+bool Search::isIndexingEnabledIn(const QUrl &directory)
{
if (g_testMode) {
return true; // For unit-testing, let's pretend everything is indexed correctly.
diff --git a/src/search/dolphinquery.h b/src/search/dolphinquery.h
index 6893e1855..73429a780 100644
--- a/src/search/dolphinquery.h
+++ b/src/search/dolphinquery.h
@@ -50,7 +50,7 @@ enum class SearchTool {
};
/** @returns whether Baloo is configured to have indexed the @p directory. */
-bool isIndexingEnabledIn(QUrl directory);
+bool isIndexingEnabledIn(const QUrl &directory);
/** @returns whether Baloo is configured to index file contents. */
bool isContentIndexingEnabled();