summaryrefslogtreecommitdiffabout
path: root/korganizer/searchdialog.cpp
authorzautrix <zautrix>2005-02-21 12:28:31 (UTC)
committer zautrix <zautrix>2005-02-21 12:28:31 (UTC)
commitb4ebc9c227f986369fe9b0193158f3893a29df08 (patch) (unidiff)
tree6f117a4927fae9142b036751509925b3641b9c3f /korganizer/searchdialog.cpp
parentbb74ffa01010ca364e101e05a6b3e090ae363a0e (diff)
downloadkdepimpi-b4ebc9c227f986369fe9b0193158f3893a29df08.zip
kdepimpi-b4ebc9c227f986369fe9b0193158f3893a29df08.tar.gz
kdepimpi-b4ebc9c227f986369fe9b0193158f3893a29df08.tar.bz2
search fixes
Diffstat (limited to 'korganizer/searchdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp20
1 files changed, 12 insertions, 8 deletions
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)
80 QHBox *subjectGroup = new QHBox( topFrame ); 80 QHBox *subjectGroup = new QHBox( topFrame );
81 layout->addWidget(subjectGroup); 81 layout->addWidget(subjectGroup);
82 82
83 mSummaryCheck = new QCheckBox(i18n("Summaries"),subjectGroup); 83 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
84 mSummaryCheck->setChecked(true); 84 mSummaryCheck->setChecked(true);
85 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); 85 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup);
86 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 86 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
@@ -185,19 +185,14 @@ void SearchDialog::doSearch()
185 listView->addJournals(mMatchedJournals); 185 listView->addJournals(mMatchedJournals);
186 186
187 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { 187 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) {
188 KMessageBox::information(this, 188 setCaption(i18n("No items found. Use '*' and '?' where needed."));
189 i18n("No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed."));
190#ifndef DESKTOP_VERSION
191 setCaption(i18n("Click OK to search ->"));
192#else
193 setCaption(i18n("KO/Pi Find "));
194#endif
195 } else { 189 } else {
196 QString mess; 190 QString mess;
197 mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); 191 mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() );
198 setCaption( i18n("KO/Pi Find: ") + mess); 192 setCaption( i18n("KO/Pi Find: ") + mess);
199 193
200 } 194 }
195 searchEdit->setFocus();
201} 196}
202void SearchDialog::updateConfig() 197void SearchDialog::updateConfig()
203{ 198{
@@ -243,6 +238,15 @@ void SearchDialog::search(const QRegExp &re)
243 mMatchedEvents.append(ev); 238 mMatchedEvents.append(ev);
244 continue; 239 continue;
245 } 240 }
241#if QT_VERSION >= 0x030000
242 if (re.search(ev->location()) != -1)
243#else
244 if (re.match(ev->location()) != -1)
245#endif
246 {
247 mMatchedEvents.append(ev);
248 continue;
249 }
246 } 250 }
247 if (mDescriptionCheck->isChecked()) { 251 if (mDescriptionCheck->isChecked()) {
248#if QT_VERSION >= 0x030000 252#if QT_VERSION >= 0x030000