-rw-r--r-- | core/pim/today/today.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index ad1ec90..62becb0 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -21,9 +21,8 @@ #include <qpe/timestring.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> -//#include <qpe/qprocess.h> #include <qpe/resource.h> #include <qpe/contact.h> #include <qpe/global.h> #include <qpe/qpeapplication.h> @@ -37,14 +36,12 @@ #include <qpushbutton.h> #include <qlabel.h> #include <qtimer.h> #include <qpixmap.h> -//#include <qfileinfo.h> #include <qlayout.h> #include <qtl.h> -//#include <iostream.h> #include <unistd.h> #include <stdlib.h> int MAX_LINES_TASK; @@ -384,9 +381,14 @@ void Today::getTodo() { qBubbleSort(overDueList); for ( QValueList<ToDoEvent>::Iterator it=overDueList.begin(); it!=overDueList.end(); ++it ) { if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) { - tmpout += "<font color=#e00000><b>-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "</b></font><br>"; + QString desc = (*it).summary(); + if( desc.isEmpty() ) { + desc = (*it).description(); + } + tmpout += "<font color=#e00000><b>-" + desc.mid(0, MAX_CHAR_CLIP) + "</b></font><br>"; + ammount++; } } @@ -399,9 +401,13 @@ void Today::getTodo() { count +=1; // not the overdues, we allready got them, and not if we are // over the maxlines if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) { - tmpout += "<b>-</b>" + ((*it).description()).mid(0, MAX_CHAR_CLIP) + "<br>"; + QString desc = (*it).summary(); + if( desc.isEmpty() ) { + desc = (*it).description(); + } + tmpout += "<b>-</b>" + desc.mid(0, MAX_CHAR_CLIP) + "<br>"; ammount++; } } } |