summaryrefslogtreecommitdiffabout
path: root/korganizer/searchdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/searchdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp12
1 files changed, 9 insertions, 3 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"));
@@ -247,8 +250,11 @@ void SearchDialog::updateView()
//qDebug("SearchDialog::updateView() %d ", isVisible());
QRegExp re;
re.setWildcard(true); // most people understand these better.
- re.setCaseSensitive(false);
- re.setPattern(searchEdit->text());
+ re.setCaseSensitive(false);
+ QString st = searchEdit->text();
+ if ( st.right(1) != "*")
+ st += "*";
+ re.setPattern(st);
if (re.isValid()) {
search(re);
} else {