-rw-r--r-- | korganizer/searchdialog.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index db60383..7a945e3 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -206,7 +206,10 @@ void SearchDialog::doSearch() re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); - re.setPattern(searchEdit->text()); + QString st = searchEdit->text(); + if ( st.right(1) != "*") + st += "*"; + re.setPattern(st); if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { KMessageBox::sorry(this, i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); @@ -248,7 +251,10 @@ void SearchDialog::updateView() QRegExp re; re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); - re.setPattern(searchEdit->text()); + QString st = searchEdit->text(); + if ( st.right(1) != "*") + st += "*"; + re.setPattern(st); if (re.isValid()) { search(re); } else { |