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/searchcriterionselector.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/search/searchcriterionselector.cpp') diff --git a/src/search/searchcriterionselector.cpp b/src/search/searchcriterionselector.cpp index 6a900fa7a..08987153a 100644 --- a/src/search/searchcriterionselector.cpp +++ b/src/search/searchcriterionselector.cpp @@ -103,6 +103,17 @@ void SearchCriterionSelector::createDescriptions() dateComps, dateValue); + // add "Size" description + QList sizeComps = defaultComps; + sizeComps.insert(0, SearchCriterionDescription::Comparator(i18nc("@label Any (file size)", "Any"))); + + SizeValue* sizeValue = new SizeValue(this); + sizeValue->hide(); + SearchCriterionDescription size(i18nc("@label", "Size"), + "contentSize", + sizeComps, + sizeValue); + // add "Tag" description QList tagComps; tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label All (tags)", "All"))); @@ -115,20 +126,12 @@ void SearchCriterionSelector::createDescriptions() tagComps, tagValue); - // add "Size" description - QList sizeComps = defaultComps; - sizeComps.insert(0, SearchCriterionDescription::Comparator(i18nc("@label Any (file size)", "Any"))); - - SizeValue* sizeValue = new SizeValue(this); - sizeValue->hide(); - SearchCriterionDescription size(i18nc("@label", "Size"), - "contentSize", - sizeComps, - sizeValue); - + Q_ASSERT(static_cast(SearchCriterionSelector::Date) == 0); + Q_ASSERT(static_cast(SearchCriterionSelector::Size) == 1); + Q_ASSERT(static_cast(SearchCriterionSelector::Tag) == 2); m_descriptions.append(date); - m_descriptions.append(tag); m_descriptions.append(size); + m_descriptions.append(tag); // add all descriptions to the combo box const int count = m_descriptions.count(); -- cgit v1.3