From c331d7068574dd468101ed8ade3ce51a2a8560c0 Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Sun, 15 Dec 2019 23:15:46 +0100 Subject: Clean-up DolphinFacetsWidget Summary: Small refactor patch to clean-up some logic on setter and getter: - Search terms are previously splitted and set separately, so no need for extra splitting and `foreach` loop - Return search terms on a `QStringList` rather than join first Depends on: D26029 Test Plan: No behavior changes Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26150 --- src/search/dolphinsearchbox.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/search/dolphinsearchbox.cpp') diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index c216e1714..23f520de1 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -477,11 +477,7 @@ QUrl DolphinSearchBox::balooUrlForSearching() const Baloo::Query query; query.addType(m_facetsWidget->facetType()); - QStringList queryStrings; - QString ratingQuery = m_facetsWidget->searchTerms(); - if (!ratingQuery.isEmpty()) { - queryStrings << ratingQuery; - } + QStringList queryStrings = m_facetsWidget->searchTerms(); if (m_contentButton->isChecked()) { queryStrings << text; -- cgit v1.3