From 1acd0dfe09a34817d8daf58db2c53b2262eec7b7 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Thu, 22 Jan 2026 16:15:09 +0100 Subject: clang-tidy: avoid copy, use const references --- src/search/chip.cpp | 2 +- src/search/dolphinquery.cpp | 2 +- src/search/dolphinquery.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/search') 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 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(); -- cgit v1.3