Summary: | Kontact's KOrganizer Sort By Start Time Bug | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Brandon Smith <smithxi> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Screenshot of problem |
Description
Brandon Smith
2007-01-23 01:31:35 UTC
Please open separate bug reports for each bug/wish. Created attachment 19385 [details]
Screenshot of problem
Just in case it's not hosted anymore I'll upload the screenshot here.
SVN commit 632254 by kainhofe: In the list view, explicitly set a sort key for dates and times. Otherwise the entries will be sorted alphabetically, which causes problems when comparing times in am/pm notation. BUG: 140469 M +13 -10 branches/work/kdepim-3.5.5+/korganizer/kolistview.cpp --- branches/work/kdepim-3.5.5+/korganizer/kolistview.cpp #632253:632254 @@ -112,17 +112,19 @@ mItem->setPixmap(0, eventPxmp); mItem->setText( 3,e->dtStartDateStr()); - if (e->doesFloat()) mItem->setText(4, "---"); else mItem->setText( 4, e->dtStartTimeStr() ); + mItem->setSortKey( 3, e->dtStart().toString(Qt::ISODate)); + if (e->doesFloat()) mItem->setText(4, "---"); else { + mItem->setText( 4, e->dtStartTimeStr() ); + mItem->setSortKey( 4,e->dtStart().time().toString(Qt::ISODate)); + } mItem->setText( 5,e->dtEndDateStr()); - if (e->doesFloat()) mItem->setText(6, "---"); else mItem->setText( 6, e->dtEndTimeStr() ); + mItem->setSortKey( 5, e->dtEnd().toString(Qt::ISODate)); + if (e->doesFloat()) mItem->setText(6, "---"); else { + mItem->setText( 6, e->dtEndTimeStr() ); + mItem->setSortKey( 6, e->dtEnd().time().toString(Qt::ISODate)); + } mItem->setText( 7,e->categoriesStr()); - QString key = e->dtStart().toString(Qt::ISODate); - mItem->setSortKey(3,key); - - key = e->dtEnd().toString(Qt::ISODate); - mItem->setSortKey(5,key); - return true; } @@ -155,6 +157,7 @@ mItem->setText(4,"---"); } else { mItem->setText(4,t->dtStartTimeStr()); + mItem->setSortKey( 4, t->dtStart().time().toString(Qt::ISODate) ); } } else { mItem->setText(3,"---"); @@ -163,10 +166,12 @@ if (t->hasDueDate()) { mItem->setText(5,t->dtDueDateStr()); + mItem->setSortKey( 5, t->dtDue().toString(Qt::ISODate) ); if (t->doesFloat()) { mItem->setText(6,"---"); } else { mItem->setText(6,t->dtDueTimeStr()); + mItem->setSortKey( 6, t->dtDue().time().toString(Qt::ISODate) ); } } else { mItem->setText(5,"---"); @@ -174,7 +179,6 @@ } mItem->setText(7,t->categoriesStr()); - mItem->setSortKey(5,t->dtDue().toString(Qt::ISODate)); return true; } @@ -189,7 +193,6 @@ mItem->setText( 0, t->summary() ); } mItem->setText( 3, t->dtStartDateStr() ); - mItem->setSortKey( 3, t->dtStart().toString( Qt::ISODate ) ); return true; |