-rw-r--r-- | korganizer/searchdialog.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 2390520..0e9f64c 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -266,13 +266,12 @@ void SearchDialog::searchTextChanged( const QString &_text ) #endif } void SearchDialog::doSearch() { QRegExp re; - re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); QString st = searchEdit->text(); if ( st.right(1) != "*") st += "*"; re.setPattern(st); @@ -315,18 +314,17 @@ void SearchDialog::updateView() re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); QString st = searchEdit->text(); if ( st.right(1) != "*") st += "*"; re.setPattern(st); - if (re.isValid()) { - search(re); - } else { mMatchedEvents.clear(); mMatchedTodos.clear(); mMatchedJournals.clear(); + if (re.isValid()) { + search(re); } listView->setStartDate( mStartDate->date() ); listView->showEvents(mMatchedEvents); listView->addTodos(mMatchedTodos); listView->addJournals(mMatchedJournals); } |