summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
authorzautrix <zautrix>2005-08-19 12:08:05 (UTC)
committer zautrix <zautrix>2005-08-19 12:08:05 (UTC)
commit9014049779be6cfec02d73e19596439f0f4f9bed (patch) (unidiff)
tree3983282e83183cc15dd615ba4ac5a800da21efe0 /korganizer/kotodoviewitem.cpp
parent81891a49afc2f7cd89db4e2770c3b7831644428d (diff)
downloadkdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.zip
kdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.tar.gz
kdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.tar.bz2
list sort fix
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index bdef94c..848e9e7 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -116,14 +116,12 @@ void KOTodoViewItem::construct()
116 setSortKey(3,keyd); 116 setSortKey(3,keyd);
117 setSortKey(4,keyt); 117 setSortKey(4,keyt);
118 118
119 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); 119 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt);
120 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); 120 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
121 121
122
123
124 keyd = ""; 122 keyd = "";
125 keyt = ""; 123 keyt = "";
126 124
127 if (mTodo->isRunning() ) { 125 if (mTodo->isRunning() ) {
128 QDate d = mTodo->runStart().date(); 126 QDate d = mTodo->runStart().date();
129 QTime t = mTodo->runStart().time(); 127 QTime t = mTodo->runStart().time();
@@ -157,24 +155,20 @@ void KOTodoViewItem::construct()
157 setText(7,mTodo->categoriesStr()); 155 setText(7,mTodo->categoriesStr());
158 setText(8,KOPrefs::instance()->calName( mTodo->calID())); 156 setText(8,KOPrefs::instance()->calName( mTodo->calID()));
159 setText(9, KGlobal::locale()->formatDateTime( mTodo->lastModified(), true, true )); 157 setText(9, KGlobal::locale()->formatDateTime( mTodo->lastModified(), true, true ));
160 setText(10, KGlobal::locale()->formatDateTime( mTodo->created(), true, true )); 158 setText(10, KGlobal::locale()->formatDateTime( mTodo->created(), true, true ));
161 setText(11, KGlobal::locale()->formatDateTime( mTodo->lastModifiedSub(), true, true )); 159 setText(11, KGlobal::locale()->formatDateTime( mTodo->lastModifiedSub(), true, true ));
162 QString key; 160 QString key;
163 QDate d = mTodo->lastModified().date(); 161 QDate d;
164 QTime t = mTodo->lastModified().time(); 162 QTime t;
165 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); 163 setSortKey(9,mTodo->lastModifiedSortKey());
166 setSortKey(9,key);
167 d = mTodo->created().date(); 164 d = mTodo->created().date();
168 t = mTodo->created().time(); 165 t = mTodo->created().time();
169 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); 166 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() );
170 setSortKey(10,key); 167 setSortKey(10,key);
171 d = mTodo->lastModifiedSub().date(); 168 setSortKey(11,mTodo->lastModifiedSubSortKey());
172 t = mTodo->lastModifiedSub().time();
173 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() );
174 setSortKey(11,key);
175 169
176#if 0 170#if 0
177 // Find sort id in description. It's the text behind the last '#' character 171 // Find sort id in description. It's the text behind the last '#' character
178 // found in the description. White spaces are removed from beginning and end 172 // found in the description. White spaces are removed from beginning and end
179 // of sort id. 173 // of sort id.
180 int pos = mTodo->description().findRev('#'); 174 int pos = mTodo->description().findRev('#');