summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-25 01:34:43 (UTC)
committer zautrix <zautrix>2005-06-25 01:34:43 (UTC)
commitab93fa0a7cd97beada9475f6099bf6083547f0d6 (patch) (unidiff)
treec983cb818528cac200a98585b3451c0371389e52
parentce9c31a057f12a8d6a126a7312e4ecaf3270da50 (diff)
downloadkdepimpi-ab93fa0a7cd97beada9475f6099bf6083547f0d6.zip
kdepimpi-ab93fa0a7cd97beada9475f6099bf6083547f0d6.tar.gz
kdepimpi-ab93fa0a7cd97beada9475f6099bf6083547f0d6.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 0713980..2390520 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -333,14 +333,18 @@ void SearchDialog::updateView()
333 333
334void SearchDialog::search(const QRegExp &re) 334void SearchDialog::search(const QRegExp &re)
335{ 335{
336 QPtrList<Event> events = mCalendar->events( mStartDate->date(), 336 QPtrList<Event> events;
337 mEndDate->date(),
338 false /*mInclusiveCheck->isChecked()*/ );
339 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 337 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
340 if ( mRefineItems->isChecked() ) events = mMatchedEvents; 338 if ( mRefineItems->isChecked() ) events = mMatchedEvents;
341 mMatchedEvents.clear(); 339 mMatchedEvents.clear();
342 } 340 }
343 if ( mSearchEvent->isChecked() ) { 341 if ( mSearchEvent->isChecked() ) {
342 if ( !mRefineItems->isChecked() )
343 events = mCalendar->events( mStartDate->date(),
344 mEndDate->date(),
345 false /*mInclusiveCheck->isChecked()*/ );
346
347
344 Event *ev; 348 Event *ev;
345 for(ev=events.first();ev;ev=events.next()) { 349 for(ev=events.first();ev;ev=events.next()) {
346 if (mSummaryCheck->isChecked()) { 350 if (mSummaryCheck->isChecked()) {
@@ -446,7 +450,7 @@ void SearchDialog::search(const QRegExp &re)
446 } 450 }
447 } 451 }
448 } 452 }
449 QPtrList<Todo> todos = mCalendar->todos( ); 453 QPtrList<Todo> todos;
450 454
451 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 455 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
452 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ; 456 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ;
@@ -454,6 +458,7 @@ void SearchDialog::search(const QRegExp &re)
454 } 458 }
455 459
456 if ( mSearchTodo->isChecked() ) { 460 if ( mSearchTodo->isChecked() ) {
461 if ( !mRefineItems->isChecked() ) todos = mCalendar->todos( );
457 Todo *tod; 462 Todo *tod;
458 for(tod=todos.first();tod;tod=todos.next()) { 463 for(tod=todos.first();tod;tod=todos.next()) {
459 if (mSummaryCheck->isChecked()) { 464 if (mSummaryCheck->isChecked()) {
@@ -535,12 +540,13 @@ void SearchDialog::search(const QRegExp &re)
535 } 540 }
536 } 541 }
537 542
538 QPtrList<Journal> journals = mCalendar->journals( ); 543 QPtrList<Journal> journals;
539 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 544 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
540 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; 545 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ;
541 mMatchedJournals.clear(); 546 mMatchedJournals.clear();
542 } 547 }
543 if (mSearchJournal->isChecked() ) { 548 if (mSearchJournal->isChecked() ) {
549 if ( ! mRefineItems->isChecked() ) journals = mCalendar->journals();
544 Journal* journ; 550 Journal* journ;
545 551
546 for(journ=journals.first();journ;journ=journals.next()) { 552 for(journ=journals.first();journ;journ=journals.next()) {