summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
authorzautrix <zautrix>2005-10-24 18:01:08 (UTC)
committer zautrix <zautrix>2005-10-24 18:01:08 (UTC)
commit9b626f37040b4da2a23cdce2d9241218b84d3d88 (patch) (side-by-side diff)
treebab5b6f2978610c4be1c105a7c3388337621d7c3 /korganizer/kotodoviewitem.cpp
parentae59704dc0643963d0ed648baf7186b741c3ecb2 (diff)
downloadkdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.zip
kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.gz
kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.bz2
fixx
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp21
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 = "";