From ebba84fbdd1effc828f88e08966dad5982371ecc Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 12 Nov 2009 20:07:14 +0000 Subject: * adjust order of search options * load real tags instead of offering the dummy "feffi" svn path=/trunk/KDE/kdebase/apps/; revision=1048145 --- src/search/dolphinsearchoptionsconfigurator.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/search/dolphinsearchoptionsconfigurator.cpp') diff --git a/src/search/dolphinsearchoptionsconfigurator.cpp b/src/search/dolphinsearchoptionsconfigurator.cpp index 112c55d82..81aee12a9 100644 --- a/src/search/dolphinsearchoptionsconfigurator.cpp +++ b/src/search/dolphinsearchoptionsconfigurator.cpp @@ -110,12 +110,17 @@ void DolphinSearchOptionsConfigurator::showEvent(QShowEvent* event) if (!event->spontaneous() && !m_initialized) { // add default search criterions SearchCriterionSelector* dateCriterion = new SearchCriterionSelector(SearchCriterionSelector::Date, this); - SearchCriterionSelector* tagCriterion = new SearchCriterionSelector(SearchCriterionSelector::Tag, this); SearchCriterionSelector* sizeCriterion = new SearchCriterionSelector(SearchCriterionSelector::Size, this); + SearchCriterionSelector* tagCriterion = new SearchCriterionSelector(SearchCriterionSelector::Tag, this); + // Add the items in the same order as available in the description combo (verified by Q_ASSERTs). This + // is not mandatory from an implementation point of view, but preferable from a usability point of view. + Q_ASSERT(static_cast(SearchCriterionSelector::Date) == 0); + Q_ASSERT(static_cast(SearchCriterionSelector::Size) == 1); + Q_ASSERT(static_cast(SearchCriterionSelector::Tag) == 2); addSelector(dateCriterion); - addSelector(tagCriterion); addSelector(sizeCriterion); + addSelector(tagCriterion); m_initialized = true; } @@ -124,7 +129,7 @@ void DolphinSearchOptionsConfigurator::showEvent(QShowEvent* event) void DolphinSearchOptionsConfigurator::slotAddSelectorButtonClicked() { - SearchCriterionSelector* selector = new SearchCriterionSelector(SearchCriterionSelector::Size, this); + SearchCriterionSelector* selector = new SearchCriterionSelector(SearchCriterionSelector::Tag, this); addSelector(selector); } -- cgit v1.3