┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/selectors
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-04-29 12:33:44 +0200
committerMéven Car <[email protected]>2025-04-29 12:33:44 +0200
commit0464ea82a6850f58805bc4d6fc1df5369d83c3df (patch)
treecd3747579d3f6fd08a59c915c4002aeaab580951 /src/search/selectors
parent246fdb3ebbde298ddb20f0323ba717c5cf9ba925 (diff)
Clazy fix
Diffstat (limited to 'src/search/selectors')
-rw-r--r--src/search/selectors/dateselector.h2
-rw-r--r--src/search/selectors/filetypeselector.h2
-rw-r--r--src/search/selectors/minimumratingselector.h2
-rw-r--r--src/search/selectors/tagsselector.cpp6
-rw-r--r--src/search/selectors/tagsselector.h2
5 files changed, 8 insertions, 6 deletions
diff --git a/src/search/selectors/dateselector.h b/src/search/selectors/dateselector.h
index 99cecec06..860c65100 100644
--- a/src/search/selectors/dateselector.h
+++ b/src/search/selectors/dateselector.h
@@ -28,7 +28,7 @@ public:
Q_SIGNALS:
/** Is emitted whenever settings have changed and a new search might be necessary. */
- void configurationChanged(const DolphinQuery &dolphinQuery);
+ void configurationChanged(const Search::DolphinQuery &dolphinQuery);
private:
void updateState(const std::shared_ptr<const DolphinQuery> &dolphinQuery) override;
diff --git a/src/search/selectors/filetypeselector.h b/src/search/selectors/filetypeselector.h
index bfc827344..10e9ea5e5 100644
--- a/src/search/selectors/filetypeselector.h
+++ b/src/search/selectors/filetypeselector.h
@@ -26,7 +26,7 @@ public:
Q_SIGNALS:
/** Is emitted whenever settings have changed and a new search might be necessary. */
- void configurationChanged(const DolphinQuery &dolphinQuery);
+ void configurationChanged(const Search::DolphinQuery &dolphinQuery);
private:
void updateState(const std::shared_ptr<const DolphinQuery> &dolphinQuery) override;
diff --git a/src/search/selectors/minimumratingselector.h b/src/search/selectors/minimumratingselector.h
index 02364cd1a..f1c14cf6c 100644
--- a/src/search/selectors/minimumratingselector.h
+++ b/src/search/selectors/minimumratingselector.h
@@ -31,7 +31,7 @@ public:
Q_SIGNALS:
/** Is emitted whenever settings have changed and a new search might be necessary. */
- void configurationChanged(const DolphinQuery &dolphinQuery);
+ void configurationChanged(const Search::DolphinQuery &dolphinQuery);
private:
void updateState(const std::shared_ptr<const DolphinQuery> &dolphinQuery) override;
diff --git a/src/search/selectors/tagsselector.cpp b/src/search/selectors/tagsselector.cpp
index 95d7ff52a..d6efb9081 100644
--- a/src/search/selectors/tagsselector.cpp
+++ b/src/search/selectors/tagsselector.cpp
@@ -133,7 +133,8 @@ void TagsSelector::updateMenu(const std::shared_ptr<const DolphinQuery> &dolphin
menu()->hide(); // The menu needs to be hidden now, then updated, and then shown again.
}
// Delete all existing actions in the menu
- for (QAction *action : menu()->actions()) {
+ const auto actions = menu()->actions();
+ for (QAction *action : actions) {
action->deleteLater();
}
menu()->clear();
@@ -180,7 +181,8 @@ void TagsSelector::updateState(const std::shared_ptr<const DolphinQuery> &dolphi
setIcon(QIcon{}); // No icon for the empty state
setText(i18nc("@action:button Required tags for search results: None", "None"));
}
- for (const auto &tag : dolphinQuery->requiredTags()) {
+ const auto tags = dolphinQuery->requiredTags();
+ for (const auto &tag : tags) {
tagsList()->addTag(tag); // We add it just in case this tag is not (or no longer) available on the system. This way the UI always works as expected.
}
if (menu()->isVisible()) {
diff --git a/src/search/selectors/tagsselector.h b/src/search/selectors/tagsselector.h
index 386cbb924..9aeba908f 100644
--- a/src/search/selectors/tagsselector.h
+++ b/src/search/selectors/tagsselector.h
@@ -27,7 +27,7 @@ public:
Q_SIGNALS:
/** Is emitted whenever settings have changed and a new search might be necessary. */
- void configurationChanged(const DolphinQuery &dolphinQuery);
+ void configurationChanged(const Search::DolphinQuery &dolphinQuery);
private:
/**