-rw-r--r-- | korganizer/kolistview.cpp | 13 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 3 |
2 files changed, 8 insertions, 8 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e1b393d..a1bf9ff 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -96,5 +96,4 @@ ListItemVisitor::~ListItemVisitor() bool ListItemVisitor::visit(Event *e) { - bool ok = false; QString start, end; @@ -127,4 +126,6 @@ bool ListItemVisitor::visit(Event *e) } mItem->setText(6, e->recurrence()->recurrenceText()); + if( ! e->doesRecur() ) + mItem->setSortKey( 6, "-" ); mItem->setText(7,"---"); mItem->setText(8,"---"); @@ -140,5 +141,4 @@ bool ListItemVisitor::visit(Event *e) key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); mItem->setSortKey(3,key); - return true; } @@ -166,4 +166,6 @@ bool ListItemVisitor::visit(Todo *t) } mItem->setText(6, t->recurrence()->recurrenceText()); + if( ! t->doesRecur() ) + mItem->setSortKey( 6, "-" ); if (t->hasDueDate()) { mItem->setText(7,t->dtDueDateStr()); @@ -881,4 +883,5 @@ void KOListView::showDates(const QDate &start, const QDate &end) void KOListView::addEvents(QPtrList<Event> eventList) { + Event *ev; for(ev = eventList.first(); ev; ev = eventList.next()) { @@ -917,10 +920,10 @@ void KOListView::addIncidence(Incidence *incidence) // mListView->setFont ( KOPrefs::instance()->mListViewFont ); mUidDict.insert( incidence->uid(), incidence ); - KOListViewItem *item = new KOListViewItem( incidence, mListView ); ListItemVisitor v(item, mStartDate ); - if (incidence->accept(v)) return; + if (incidence->accept(v)) { + return; + } else delete item; - //qDebug("delete item "); } diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index de65b53..007d1f3 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -224,12 +224,9 @@ void SearchDialog::doSearch() return; } - search(re); - listView->setStartDate( mStartDate->date() ); listView->showEvents(mMatchedEvents); listView->addTodos(mMatchedTodos); listView->addJournals(mMatchedJournals); - if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { setCaption(i18n("No items found. Use '*' and '?' where needed.")); |