┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchoptionsconfigurator.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-11-12 20:07:14 +0000
committerPeter Penz <[email protected]>2009-11-12 20:07:14 +0000
commitebba84fbdd1effc828f88e08966dad5982371ecc (patch)
treef60155d31af6e274c721d83e9fbd284d3a74683d /src/search/dolphinsearchoptionsconfigurator.cpp
parent1c62d0accf3cdfbeaaf93abb06971531cce156f1 (diff)
* adjust order of search options
* load real tags instead of offering the dummy "feffi" svn path=/trunk/KDE/kdebase/apps/; revision=1048145
Diffstat (limited to 'src/search/dolphinsearchoptionsconfigurator.cpp')
-rw-r--r--src/search/dolphinsearchoptionsconfigurator.cpp11
1 files changed, 8 insertions, 3 deletions
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<int>(SearchCriterionSelector::Date) == 0);
+ Q_ASSERT(static_cast<int>(SearchCriterionSelector::Size) == 1);
+ Q_ASSERT(static_cast<int>(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);
}