┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIsmael Asensio <[email protected]>2019-11-13 22:48:45 +0100
committerIsmael Asensio <[email protected]>2019-11-13 22:53:18 +0100
commitadfc098aa74723ec3f01cda513290864ef9ee0f9 (patch)
tree7c08a7d4f22679355b4331210afed11d161136ce /src
parentfc5546d03b08e89060ee6abf9d58c273ae1e705b (diff)
fix(search): Allow to set empty type
Summary: This small patch allows to set and empty `type` to the extended options, which will set the `Any Type` option (index 0). It doesn't make any change in current code, since this case is not called, but it helps simplifying follow-up patches. Test Plan: No behavior changes with current code. Calling `setFacetsType(QString())` actually sets the first option (`Any Type`) Reviewers: elvisangelaccio, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25255
Diffstat (limited to 'src')
-rw-r--r--src/search/dolphinfacetswidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp
index 182719225..ae05509e7 100644
--- a/src/search/dolphinfacetswidget.cpp
+++ b/src/search/dolphinfacetswidget.cpp
@@ -153,7 +153,7 @@ void DolphinFacetsWidget::setRatingTerm(const QString& term)
void DolphinFacetsWidget::setFacetType(const QString& type)
{
- for (int index = 1; index <= m_typeSelector->count(); index++) {
+ for (int index = 0; index <= m_typeSelector->count(); index++) {
if (type == m_typeSelector->itemData(index).toString()) {
m_typeSelector->setCurrentIndex(index);
break;