summaryrefslogtreecommitdiffabout
path: root/korganizer/searchdialog.cpp
Unidiff
Diffstat (limited to 'korganizer/searchdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 0e9f64c..72359df 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -218,6 +218,9 @@ void SearchDialog::raiseAndSelect()
218 mSearchJournal->setChecked( true ); 218 mSearchJournal->setChecked( true );
219 mSearchTodo->setChecked( false ); 219 mSearchTodo->setChecked( false );
220 mSearchEvent->setChecked( false ); 220 mSearchEvent->setChecked( false );
221 mSummaryCheck->setChecked( true );
222 mDescriptionCheck->setChecked( true );
223
221 } 224 }
222 } 225 }
223 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 226 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
@@ -550,6 +553,7 @@ void SearchDialog::search(const QRegExp &re)
550 for(journ=journals.first();journ;journ=journals.next()) { 553 for(journ=journals.first();journ;journ=journals.next()) {
551 if ( journ->dtStart().date() <= mEndDate->date() 554 if ( journ->dtStart().date() <= mEndDate->date()
552 &&journ->dtStart().date() >= mStartDate->date()) { 555 &&journ->dtStart().date() >= mStartDate->date()) {
556 if (mDescriptionCheck->isChecked()) {
553#if QT_VERSION >= 0x030000 557#if QT_VERSION >= 0x030000
554 if (re.search(journ->description()) != -1) 558 if (re.search(journ->description()) != -1)
555#else 559#else
@@ -563,6 +567,21 @@ void SearchDialog::search(const QRegExp &re)
563 continue; 567 continue;
564 } 568 }
565 } 569 }
570 if (mSummaryCheck->isChecked()) {
571#if QT_VERSION >= 0x030000
572 if (re.search(journ->summary()) != -1)
573#else
574 if (re.match(journ->summary()) != -1)
575#endif
576 {
577 if ( mSubItems->isChecked() )
578 mMatchedJournals.remove(journ);
579 else if (!mMatchedJournals.contains( journ ))
580 mMatchedJournals.append(journ);
581 continue;
582 }
583 }
584 }
566 } 585 }
567 } 586 }
568 if ( mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() < 1 ) { 587 if ( mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() < 1 ) {