summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-17 17:29:12 (UTC)
committer zautrix <zautrix>2005-04-17 17:29:12 (UTC)
commite3e76014e70643b0828f30f5c5277e212495d37c (patch) (unidiff)
tree6c1b65d08bbecf7f5d83db636cebe3425b1521e8 /korganizer
parent70b45fe97813c4fd336b7ca8fdedab13f9c2e039 (diff)
downloadkdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.zip
kdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.tar.gz
kdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp13
-rw-r--r--korganizer/searchdialog.cpp3
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
@@ -95,7 +95,6 @@ ListItemVisitor::~ListItemVisitor()
95 95
96bool ListItemVisitor::visit(Event *e) 96bool ListItemVisitor::visit(Event *e)
97{ 97{
98
99 bool ok = false; 98 bool ok = false;
100 QString start, end; 99 QString start, end;
101 QDate ds, de; 100 QDate ds, de;
@@ -126,6 +125,8 @@ bool ListItemVisitor::visit(Event *e)
126 mItem->setText(5, i18n("No")); 125 mItem->setText(5, i18n("No"));
127 } 126 }
128 mItem->setText(6, e->recurrence()->recurrenceText()); 127 mItem->setText(6, e->recurrence()->recurrenceText());
128 if( ! e->doesRecur() )
129 mItem->setSortKey( 6, "-" );
129 mItem->setText(7,"---"); 130 mItem->setText(7,"---");
130 mItem->setText(8,"---"); 131 mItem->setText(8,"---");
131 mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); 132 mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No"));
@@ -139,7 +140,6 @@ bool ListItemVisitor::visit(Event *e)
139 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); 140 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time();
140 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); 141 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute());
141 mItem->setSortKey(3,key); 142 mItem->setSortKey(3,key);
142
143 return true; 143 return true;
144} 144}
145 145
@@ -165,6 +165,8 @@ bool ListItemVisitor::visit(Todo *t)
165 mItem->setText(5, i18n("No")); 165 mItem->setText(5, i18n("No"));
166 } 166 }
167 mItem->setText(6, t->recurrence()->recurrenceText()); 167 mItem->setText(6, t->recurrence()->recurrenceText());
168 if( ! t->doesRecur() )
169 mItem->setSortKey( 6, "-" );
168 if (t->hasDueDate()) { 170 if (t->hasDueDate()) {
169 mItem->setText(7,t->dtDueDateStr()); 171 mItem->setText(7,t->dtDueDateStr());
170 if (t->doesFloat()) { 172 if (t->doesFloat()) {
@@ -880,6 +882,7 @@ void KOListView::showDates(const QDate &start, const QDate &end)
880 882
881void KOListView::addEvents(QPtrList<Event> eventList) 883void KOListView::addEvents(QPtrList<Event> eventList)
882{ 884{
885
883 Event *ev; 886 Event *ev;
884 for(ev = eventList.first(); ev; ev = eventList.next()) { 887 for(ev = eventList.first(); ev; ev = eventList.next()) {
885 addIncidence(ev); 888 addIncidence(ev);
@@ -916,12 +919,12 @@ void KOListView::addIncidence(Incidence *incidence)
916 919
917 // mListView->setFont ( KOPrefs::instance()->mListViewFont ); 920 // mListView->setFont ( KOPrefs::instance()->mListViewFont );
918 mUidDict.insert( incidence->uid(), incidence ); 921 mUidDict.insert( incidence->uid(), incidence );
919
920 KOListViewItem *item = new KOListViewItem( incidence, mListView ); 922 KOListViewItem *item = new KOListViewItem( incidence, mListView );
921 ListItemVisitor v(item, mStartDate ); 923 ListItemVisitor v(item, mStartDate );
922 if (incidence->accept(v)) return; 924 if (incidence->accept(v)) {
925 return;
926 }
923 else delete item; 927 else delete item;
924 //qDebug("delete item ");
925} 928}
926 929
927void KOListView::showEvents(QPtrList<Event> eventList) 930void KOListView::showEvents(QPtrList<Event> eventList)
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index de65b53..007d1f3 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -223,14 +223,11 @@ void SearchDialog::doSearch()
223 "where needed.")); 223 "where needed."));
224 return; 224 return;
225 } 225 }
226
227 search(re); 226 search(re);
228
229 listView->setStartDate( mStartDate->date() ); 227 listView->setStartDate( mStartDate->date() );
230 listView->showEvents(mMatchedEvents); 228 listView->showEvents(mMatchedEvents);
231 listView->addTodos(mMatchedTodos); 229 listView->addTodos(mMatchedTodos);
232 listView->addJournals(mMatchedJournals); 230 listView->addJournals(mMatchedJournals);
233
234 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { 231 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) {
235 setCaption(i18n("No items found. Use '*' and '?' where needed.")); 232 setCaption(i18n("No items found. Use '*' and '?' where needed."));
236 } else { 233 } else {