Adds a method to reset the options in facetsWidget in two cases: when disabled and before parsing a new search URL.
Otherwise, controls for a parameter (ex. rating) which are not found in the new URL would stay on the old positions, instead of the default "any".
See D24422
Details
Details
- Reviewers
elvisangelaccio meven ngraham - Group Reviewers
Dolphin - Commits
- R318:c540b4eef12d: [dolphin/search] Reset search options when needed
Controls on facetsWidget go back to the default in such two cases.
Diff Detail
Diff Detail
- Repository
- R318 Dolphin
- Branch
- search_parse_reset
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 17663 Build 17681: arc lint + arc unit
src/search/dolphinfacetswidget.h | ||
---|---|---|
54 | It is not used yet it seems, I guess you are planning to. |
src/search/dolphinfacetswidget.h | ||
---|---|---|
54 | It is used in fact in line 111 of dolphinsearchbox.cpp: m_facetsWidget->setEnabled(hasFacetsSupport);, but you are right: this helps a lot the merging of other revisions (and IMHO conceptually makes sense). |
src/search/dolphinfacetswidget.h | ||
---|---|---|
54 | QWidget::setEnabled() is not virtual, so we should not create another setEnabled() method in a child class. You can use the QEvent::EnabledChange event instead: https://doc.qt.io/qt-5/qwidget.html#enabled-prop |