diff options
| author | Peter Penz <[email protected]> | 2009-11-13 21:03:19 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-11-13 21:03:19 +0000 |
| commit | bd30bb6ca98374b37db20d14a41542c21acdd5e0 (patch) | |
| tree | 276188af9fe38b22cd6698a53269fcffac318736 /src/search/searchcriterionselector.cpp | |
| parent | a87760d22c0213306380322ec6d9e23809ee4c93 (diff) | |
search finetuning:
* trigger progress information when starting a search
* let the information panel hide the meta data for the search string
* get the search string from the configurator
svn path=/trunk/KDE/kdebase/apps/; revision=1048721
Diffstat (limited to 'src/search/searchcriterionselector.cpp')
| -rw-r--r-- | src/search/searchcriterionselector.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/search/searchcriterionselector.cpp b/src/search/searchcriterionselector.cpp index f685e50fc..4b6112b9c 100644 --- a/src/search/searchcriterionselector.cpp +++ b/src/search/searchcriterionselector.cpp @@ -74,7 +74,7 @@ SearchCriterionSelector::~SearchCriterionSelector() { } -QString SearchCriterionSelector::queryString() const +QString SearchCriterionSelector::toString() const { if (m_valueWidget == 0) { return QString(); @@ -85,9 +85,15 @@ QString SearchCriterionSelector::queryString() const const int compIndex = m_comparatorBox->currentIndex(); const SearchCriterionDescription::Comparator& comp = descr.comparators()[compIndex]; + if (comp.operation.isEmpty()) { + return QString(); + } - return comp.prefix + descr.identifier() + comp.operation + - '"' + m_valueWidget->value() + '"'; + QString criterion = comp.prefix + descr.identifier() + comp.operation; + if (!m_valueWidget->value().isEmpty()) { + criterion += '"' + m_valueWidget->value() + '"'; + } + return criterion; } void SearchCriterionSelector::slotDescriptionChanged(int index) |
