From bd30bb6ca98374b37db20d14a41542c21acdd5e0 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 13 Nov 2009 21:03:19 +0000 Subject: 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 --- src/search/searchcriterionselector.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/search/searchcriterionselector.cpp') 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) -- cgit v1.3