author | zautrix <zautrix> | 2005-10-24 18:01:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-24 18:01:08 (UTC) |
commit | 9b626f37040b4da2a23cdce2d9241218b84d3d88 (patch) (unidiff) | |
tree | bab5b6f2978610c4be1c105a7c3388337621d7c3 | |
parent | ae59704dc0643963d0ed648baf7186b741c3ecb2 (diff) | |
download | kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.zip kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.gz kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.bz2 |
fixx
-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 | |||
@@ -41,10 +41,21 @@ KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView * | |||
41 | 41 | ||
42 | QString KOTodoViewItem::key(int column,bool) const | 42 | QString KOTodoViewItem::key(int column,bool) const |
43 | { | 43 | { |
44 | if ( column == 0 ) | ||
45 | return text(0).lower(); | ||
46 | if ( column == 1 ) { | ||
47 | if ( mTodo->isCompleted() ) { | ||
48 | return "6"+QString::number(mTodo->priority())+text(0).lower(); | ||
49 | } | ||
50 | return QString::number(mTodo->priority())+text(0).lower(); | ||
51 | } | ||
44 | QMap<int,QString>::ConstIterator it = mKeyMap.find(column); | 52 | QMap<int,QString>::ConstIterator it = mKeyMap.find(column); |
45 | if (it == mKeyMap.end()) { | 53 | if (it == mKeyMap.end()) { |
46 | return text(column).lower(); | 54 | return text(column).lower(); |
47 | } else { | 55 | } else { |
56 | if ( column == 2 ) { | ||
57 | return *it+text(0).lower(); | ||
58 | } | ||
48 | return *it; | 59 | return *it; |
49 | } | 60 | } |
50 | } | 61 | } |
@@ -88,12 +99,10 @@ void KOTodoViewItem::construct() | |||
88 | setText(1,QString::number(mTodo->priority())); | 99 | setText(1,QString::number(mTodo->priority())); |
89 | setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete()))); | 100 | setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete()))); |
90 | if (mTodo->percentComplete()<100) { | 101 | if (mTodo->percentComplete()<100) { |
91 | if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); | 102 | setSortKey(2,QString::number(mTodo->percentComplete())); |
92 | else setSortKey(2,QString::number(mTodo->percentComplete())); | ||
93 | } | 103 | } |
94 | else { | 104 | else { |
95 | if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); | 105 | setSortKey(2,"999"); |
96 | else setSortKey(2,QString::number(99)); | ||
97 | } | 106 | } |
98 | if (mTodo->hasDueDate()) { | 107 | if (mTodo->hasDueDate()) { |
99 | setText(3, mTodo->dtDueDateStr()); | 108 | setText(3, mTodo->dtDueDateStr()); |
@@ -115,10 +124,10 @@ void KOTodoViewItem::construct() | |||
115 | } | 124 | } |
116 | setSortKey(3,keyd); | 125 | setSortKey(3,keyd); |
117 | setSortKey(4,keyt); | 126 | setSortKey(4,keyt); |
118 | 127 | #if 0 | |
119 | if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); | 128 | if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); |
120 | else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); | 129 | else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); |
121 | 130 | #endif | |
122 | keyd = ""; | 131 | keyd = ""; |
123 | keyt = ""; | 132 | keyt = ""; |
124 | 133 | ||