-rw-r--r-- | korganizer/kotodoviewitem.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 848e9e7..519bb16 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -43,2 +43,10 @@ QString KOTodoViewItem::key(int column,bool) const { + if ( column == 0 ) + return text(0).lower(); + if ( column == 1 ) { + if ( mTodo->isCompleted() ) { + return "6"+QString::number(mTodo->priority())+text(0).lower(); + } + return QString::number(mTodo->priority())+text(0).lower(); + } QMap<int,QString>::ConstIterator it = mKeyMap.find(column); @@ -47,2 +55,5 @@ QString KOTodoViewItem::key(int column,bool) const } else { + if ( column == 2 ) { + return *it+text(0).lower(); + } return *it; @@ -90,8 +101,6 @@ void KOTodoViewItem::construct() if (mTodo->percentComplete()<100) { - if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); - else setSortKey(2,QString::number(mTodo->percentComplete())); + setSortKey(2,QString::number(mTodo->percentComplete())); } else { - if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); - else setSortKey(2,QString::number(99)); + setSortKey(2,"999"); } @@ -117,6 +126,6 @@ void KOTodoViewItem::construct() setSortKey(4,keyt); - +#if 0 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); - +#endif keyd = ""; |