Bug 140469 - Kontact's KOrganizer Sort By Start Time Bug
Summary: Kontact's KOrganizer Sort By Start Time Bug
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 01:31 UTC by Brandon Smith
Modified: 2007-02-10 13:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of problem (27.76 KB, image/png)
2007-01-23 10:51 UTC, Bram Schoenmakers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Smith 2007-01-23 01:31:35 UTC
Version:           3.5.5. (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When KOrganizers events are sorted my "Start Time" am and pm differences are not recognized.

see image...

http://123pichosting.com/images/5023snapshot3.png

On another note, I believe that the second click of KOrganizer's system tray icon should hide KOrganizer, or close the KOrganizer window.

Lastly, regarding KMail, the menu listing from the mouse's right click's label is sized bigger than all other system tray's right click menu entries.
Comment 1 Bram Schoenmakers 2007-01-23 10:50:52 UTC
Please open separate bug reports for each bug/wish.
Comment 2 Bram Schoenmakers 2007-01-23 10:51:43 UTC
Created attachment 19385 [details]
Screenshot of problem

Just in case it's not hosted anymore I'll upload the screenshot here.
Comment 3 Reinhold Kainhofer 2007-02-10 13:33:28 UTC
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;