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.cpp37
1 files changed, 28 insertions, 9 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 0e9f64c..72359df 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -220,2 +220,5 @@ void SearchDialog::raiseAndSelect()
mSearchEvent->setChecked( false );
+ mSummaryCheck->setChecked( true );
+ mDescriptionCheck->setChecked( true );
+
}
@@ -552,14 +555,30 @@ void SearchDialog::search(const QRegExp &re)
&&journ->dtStart().date() >= mStartDate->date()) {
+ if (mDescriptionCheck->isChecked()) {
#if QT_VERSION >= 0x030000
- if (re.search(journ->description()) != -1)
+ if (re.search(journ->description()) != -1)
#else
- if (re.match(journ->description()) != -1)
+ if (re.match(journ->description()) != -1)
#endif
- {
- if ( mSubItems->isChecked() )
- mMatchedJournals.remove(journ);
- else if (!mMatchedJournals.contains( journ ))
- mMatchedJournals.append(journ);
- continue;
- }
+ {
+ if ( mSubItems->isChecked() )
+ mMatchedJournals.remove(journ);
+ else if (!mMatchedJournals.contains( journ ))
+ mMatchedJournals.append(journ);
+ continue;
+ }
+ }
+ if (mSummaryCheck->isChecked()) {
+#if QT_VERSION >= 0x030000
+ if (re.search(journ->summary()) != -1)
+#else
+ if (re.match(journ->summary()) != -1)
+#endif
+ {
+ if ( mSubItems->isChecked() )
+ mMatchedJournals.remove(journ);
+ else if (!mMatchedJournals.contains( journ ))
+ mMatchedJournals.append(journ);
+ continue;
+ }
+ }
}