From 732697d0d6fcc3a834a85865dcd88870e127711b Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Sat, 21 Dec 2019 19:41:44 +0100 Subject: Rename methods on DolphinFacetsWidget Summary: Small refactor patch to rename method names, from `ratingTerm` to `searchTerm`, since its scope has grown bigger. Test Plan: No behavior changes Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26029 --- src/search/dolphinfacetswidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/search/dolphinfacetswidget.cpp') diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index c0b6c5243..ea11a400f 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -86,7 +86,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : topLayout->addWidget(m_ratingSelector); topLayout->addWidget(m_tagsSelector); - resetOptions(); + resetSearchTerms(); } DolphinFacetsWidget::~DolphinFacetsWidget() @@ -99,12 +99,12 @@ void DolphinFacetsWidget::changeEvent(QEvent *event) if (isEnabled()) { updateTagsSelector(); } else { - resetOptions(); + resetSearchTerms(); } } } -void DolphinFacetsWidget::resetOptions() +void DolphinFacetsWidget::resetSearchTerms() { m_typeSelector->setCurrentIndex(0); m_dateSelector->setCurrentIndex(0); @@ -115,7 +115,7 @@ void DolphinFacetsWidget::resetOptions() updateTagsMenu(); } -QString DolphinFacetsWidget::ratingTerm() const +QString DolphinFacetsWidget::searchTerms() const { QStringList terms; @@ -143,7 +143,7 @@ QString DolphinFacetsWidget::facetType() const return m_typeSelector->currentData().toString(); } -bool DolphinFacetsWidget::isRatingTerm(const QString& term) const +bool DolphinFacetsWidget::isSearchTerm(const QString& term) const { const QStringList subTerms = term.split(' ', QString::SkipEmptyParts); @@ -166,7 +166,7 @@ bool DolphinFacetsWidget::isRatingTerm(const QString& term) const return containsModified || containsRating || containsTag; } -void DolphinFacetsWidget::setRatingTerm(const QString& term) +void DolphinFacetsWidget::setSearchTerm(const QString& term) { // If term has sub terms, then the sub terms are always "rating" and "modified" terms. // If term has no sub terms, then the term itself is either a "rating" term or a "modified" -- cgit v1.3