From b4ebc9c227f986369fe9b0193158f3893a29df08 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 21 Feb 2005 12:28:31 +0000 Subject: search fixes --- (limited to 'korganizer/searchdialog.cpp') diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 3a95978..3fd9740 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -80,7 +80,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) QHBox *subjectGroup = new QHBox( topFrame ); layout->addWidget(subjectGroup); - mSummaryCheck = new QCheckBox(i18n("Summaries"),subjectGroup); + mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); mSummaryCheck->setChecked(true); mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); @@ -185,19 +185,14 @@ void SearchDialog::doSearch() listView->addJournals(mMatchedJournals); if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { - KMessageBox::information(this, - i18n("No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.")); -#ifndef DESKTOP_VERSION - setCaption(i18n("Click OK to search ->")); -#else - setCaption(i18n("KO/Pi Find ")); -#endif + setCaption(i18n("No items found. Use '*' and '?' where needed.")); } else { QString mess; mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); setCaption( i18n("KO/Pi Find: ") + mess); } + searchEdit->setFocus(); } void SearchDialog::updateConfig() { @@ -243,6 +238,15 @@ void SearchDialog::search(const QRegExp &re) mMatchedEvents.append(ev); continue; } +#if QT_VERSION >= 0x030000 + if (re.search(ev->location()) != -1) +#else + if (re.match(ev->location()) != -1) +#endif + { + mMatchedEvents.append(ev); + continue; + } } if (mDescriptionCheck->isChecked()) { #if QT_VERSION >= 0x030000 -- cgit v0.9.0.2