summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-17 17:29:12 (UTC)
committer zautrix <zautrix>2005-04-17 17:29:12 (UTC)
commite3e76014e70643b0828f30f5c5277e212495d37c (patch) (side-by-side diff)
tree6c1b65d08bbecf7f5d83db636cebe3425b1521e8
parent70b45fe97813c4fd336b7ca8fdedab13f9c2e039 (diff)
downloadkdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.zip
kdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.tar.gz
kdepimpi-e3e76014e70643b0828f30f5c5277e212495d37c.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp13
-rw-r--r--korganizer/searchdialog.cpp3
-rw-r--r--libkcal/alarm.cpp2
-rw-r--r--libkcal/kincidenceformatter.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index e1b393d..a1bf9ff 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -94,9 +94,8 @@ ListItemVisitor::~ListItemVisitor()
}
bool ListItemVisitor::visit(Event *e)
{
-
bool ok = false;
QString start, end;
QDate ds, de;
if ( e->doesRecur() ) {
@@ -125,8 +124,10 @@ bool ListItemVisitor::visit(Event *e)
} else {
mItem->setText(5, i18n("No"));
}
mItem->setText(6, e->recurrence()->recurrenceText());
+ if( ! e->doesRecur() )
+ mItem->setSortKey( 6, "-" );
mItem->setText(7,"---");
mItem->setText(8,"---");
mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No"));
mItem->setText(10,e->categoriesStr());
@@ -138,9 +139,8 @@ bool ListItemVisitor::visit(Event *e)
t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time();
key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute());
mItem->setSortKey(3,key);
-
return true;
}
bool ListItemVisitor::visit(Todo *t)
@@ -164,8 +164,10 @@ bool ListItemVisitor::visit(Todo *t)
} else {
mItem->setText(5, i18n("No"));
}
mItem->setText(6, t->recurrence()->recurrenceText());
+ if( ! t->doesRecur() )
+ mItem->setSortKey( 6, "-" );
if (t->hasDueDate()) {
mItem->setText(7,t->dtDueDateStr());
if (t->doesFloat()) {
mItem->setText(8,"---");
@@ -879,8 +881,9 @@ 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()) {
addIncidence(ev);
}
@@ -915,14 +918,14 @@ void KOListView::addIncidence(Incidence *incidence)
if ( mUidDict.find( incidence->uid() ) ) return;
// 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 ");
}
void 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
@@ -222,16 +222,13 @@ void SearchDialog::doSearch()
"using the wildcard characters\n '*' and '?'"
"where needed."));
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."));
} else {
QString mess;
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index d8f15b5..6de1566 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -357,9 +357,9 @@ QString Alarm::offsetText()
min = min % 60;
int days = hours /24;
hours = hours % 24;
QString message;
- qDebug("%d %d %d ", days, hours, min );
+ //qDebug("%d %d %d ", days, hours, min );
if ( days > 0 )
message += i18n("%1d").arg( days );
if ( hours > 0 ) {
if ( !message.isEmpty() ) message += "/";
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 8ae5b46..7d61b7f 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -282,9 +282,9 @@ void KIncidenceFormatter::setJournal(Journal* )
void KIncidenceFormatter::formatCategories(Incidence *event)
{
if (!event->categoriesStr().isEmpty()) {
- addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() );
+ addTag("p",i18n("<b>Categories: </b>")+event->categoriesStrWithSpace() );
//mText.append(event->categoriesStr());
}
}
void KIncidenceFormatter::addTag(const QString & tag,const QString & text)