┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/searchcriterionselector.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/searchcriterionselector.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/searchcriterionselector.cpp')
-rw-r--r--src/search/searchcriterionselector.cpp27
1 files changed, 15 insertions, 12 deletions
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<SearchCriterionDescription::Comparator> 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<SearchCriterionDescription::Comparator> tagComps;
tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label All (tags)", "All")));
@@ -115,20 +126,12 @@ void SearchCriterionSelector::createDescriptions()
tagComps,
tagValue);
- // add "Size" description
- QList<SearchCriterionDescription::Comparator> 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<int>(SearchCriterionSelector::Date) == 0);
+ Q_ASSERT(static_cast<int>(SearchCriterionSelector::Size) == 1);
+ Q_ASSERT(static_cast<int>(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();