-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 | |||
@@ -268,9 +268,8 @@ void SearchDialog::searchTextChanged( const QString &_text ) | |||
268 | 268 | ||
269 | void SearchDialog::doSearch() | 269 | void SearchDialog::doSearch() |
270 | { | 270 | { |
271 | QRegExp re; | 271 | QRegExp re; |
272 | |||
273 | re.setWildcard(true); // most people understand these better. | 272 | re.setWildcard(true); // most people understand these better. |
274 | re.setCaseSensitive(false); | 273 | re.setCaseSensitive(false); |
275 | QString st = searchEdit->text(); | 274 | QString st = searchEdit->text(); |
276 | if ( st.right(1) != "*") | 275 | if ( st.right(1) != "*") |
@@ -317,14 +316,13 @@ void SearchDialog::updateView() | |||
317 | QString st = searchEdit->text(); | 316 | QString st = searchEdit->text(); |
318 | if ( st.right(1) != "*") | 317 | if ( st.right(1) != "*") |
319 | st += "*"; | 318 | st += "*"; |
320 | re.setPattern(st); | 319 | re.setPattern(st); |
321 | if (re.isValid()) { | ||
322 | search(re); | ||
323 | } else { | ||
324 | mMatchedEvents.clear(); | 320 | mMatchedEvents.clear(); |
325 | mMatchedTodos.clear(); | 321 | mMatchedTodos.clear(); |
326 | mMatchedJournals.clear(); | 322 | mMatchedJournals.clear(); |
323 | if (re.isValid()) { | ||
324 | search(re); | ||
327 | } | 325 | } |
328 | listView->setStartDate( mStartDate->date() ); | 326 | listView->setStartDate( mStartDate->date() ); |
329 | listView->showEvents(mMatchedEvents); | 327 | listView->showEvents(mMatchedEvents); |
330 | listView->addTodos(mMatchedTodos); | 328 | listView->addTodos(mMatchedTodos); |