author | zautrix <zautrix> | 2005-06-29 12:29:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 12:29:53 (UTC) |
commit | 0d4d5898a32f162dca010db329e02310a14629d5 (patch) (side-by-side diff) | |
tree | 2d6e758a8a5ec64995de79a4cd1c02c89f509190 /korganizer/searchdialog.cpp | |
parent | 435e68d6ace30fb2121b718226e00be44971c617 (diff) | |
download | kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.zip kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.tar.gz kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.tar.bz2 |
j fixes
-rw-r--r-- | korganizer/searchdialog.cpp | 37 |
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 @@ -218,6 +218,9 @@ void SearchDialog::raiseAndSelect() mSearchJournal->setChecked( true ); mSearchTodo->setChecked( false ); mSearchEvent->setChecked( false ); + mSummaryCheck->setChecked( true ); + mDescriptionCheck->setChecked( true ); + } } else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { @@ -550,18 +553,34 @@ void SearchDialog::search(const QRegExp &re) for(journ=journals.first();journ;journ=journals.next()) { if ( journ->dtStart().date() <= mEndDate->date() &&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; + } + } } } } |