-rw-r--r-- | korganizer/searchdialog.cpp | 16 |
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 @@ -335,5 +335,3 @@ void SearchDialog::search(const QRegExp &re) { - QPtrList<Event> events = mCalendar->events( mStartDate->date(), - mEndDate->date(), - false /*mInclusiveCheck->isChecked()*/ ); + QPtrList<Event> events; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { @@ -343,2 +341,8 @@ void SearchDialog::search(const QRegExp &re) if ( mSearchEvent->isChecked() ) { + if ( !mRefineItems->isChecked() ) + events = mCalendar->events( mStartDate->date(), + mEndDate->date(), + false /*mInclusiveCheck->isChecked()*/ ); + + Event *ev; @@ -448,3 +452,3 @@ void SearchDialog::search(const QRegExp &re) } - QPtrList<Todo> todos = mCalendar->todos( ); + QPtrList<Todo> todos; @@ -456,2 +460,3 @@ void SearchDialog::search(const QRegExp &re) if ( mSearchTodo->isChecked() ) { + if ( !mRefineItems->isChecked() ) todos = mCalendar->todos( ); Todo *tod; @@ -537,3 +542,3 @@ void SearchDialog::search(const QRegExp &re) - QPtrList<Journal> journals = mCalendar->journals( ); + QPtrList<Journal> journals; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { @@ -543,2 +548,3 @@ void SearchDialog::search(const QRegExp &re) if (mSearchJournal->isChecked() ) { + if ( ! mRefineItems->isChecked() ) journals = mCalendar->journals(); Journal* journ; |