From 9014049779be6cfec02d73e19596439f0f4f9bed Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 19 Aug 2005 12:08:05 +0000 Subject: list sort fix --- (limited to 'korganizer/kotodoviewitem.cpp') diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index bdef94c..848e9e7 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -119,8 +119,6 @@ void KOTodoViewItem::construct() if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); - - keyd = ""; keyt = ""; @@ -160,18 +158,14 @@ void KOTodoViewItem::construct() setText(10, KGlobal::locale()->formatDateTime( mTodo->created(), true, true )); setText(11, KGlobal::locale()->formatDateTime( mTodo->lastModifiedSub(), true, true )); QString key; - QDate d = mTodo->lastModified().date(); - QTime t = mTodo->lastModified().time(); - key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); - setSortKey(9,key); + QDate d; + QTime t; + setSortKey(9,mTodo->lastModifiedSortKey()); d = mTodo->created().date(); t = mTodo->created().time(); key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); setSortKey(10,key); - d = mTodo->lastModifiedSub().date(); - t = mTodo->lastModifiedSub().time(); - key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); - setSortKey(11,key); + setSortKey(11,mTodo->lastModifiedSubSortKey()); #if 0 // Find sort id in description. It's the text behind the last '#' character -- cgit v0.9.0.2