summaryrefslogtreecommitdiffabout
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
parentae59704dc0643963d0ed648baf7186b741c3ecb2 (diff)
downloadkdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.zip
kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.gz
kdepimpi-9b626f37040b4da2a23cdce2d9241218b84d3d88.tar.bz2
fixx
Diffstat (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
@@ -40,12 +40,23 @@ KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *
}
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);
if (it == mKeyMap.end()) {
return text(column).lower();
} else {
+ if ( column == 2 ) {
+ return *it+text(0).lower();
+ }
return *it;
}
}
@@ -87,14 +98,12 @@ void KOTodoViewItem::construct()
setText(0,mTodo->summary());
setText(1,QString::number(mTodo->priority()));
setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete())));
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");
}
if (mTodo->hasDueDate()) {
setText(3, mTodo->dtDueDateStr());
QDate d = mTodo->dtDue().date();
@@ -114,12 +123,12 @@ void KOTodoViewItem::construct()
setText(4,"");
}
setSortKey(3,keyd);
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 = "";
keyt = "";
if (mTodo->isRunning() ) {