From 63d7fd9b233a5b6a9e3670b6ef1c09a2e87ffa42 Mon Sep 17 00:00:00 2001 From: harlekin Date: Thu, 27 Jun 2002 14:33:51 +0000 Subject: should fix bug #83 --- (limited to 'core') 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 @@ -22,7 +22,6 @@ #include #include #include -//#include #include #include #include @@ -38,12 +37,10 @@ #include #include #include -//#include #include #include -//#include #include #include @@ -384,10 +381,15 @@ void Today::getTodo() { qBubbleSort(overDueList); for ( QValueList::Iterator it=overDueList.begin(); it!=overDueList.end(); ++it ) { - if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) { - tmpout += "-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "
"; - ammount++; - } + if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) { + QString desc = (*it).summary(); + if( desc.isEmpty() ) { + desc = (*it).description(); + } + tmpout += "-" + desc.mid(0, MAX_CHAR_CLIP) + "
"; + + ammount++; + } } // get total number of still open todos @@ -395,15 +397,19 @@ void Today::getTodo() { qBubbleSort(openTodo); for ( QValueList::Iterator it=openTodo.begin(); it!=openTodo.end(); ++it ) { - if (!(*it).isCompleted()){ - 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 += "-" + ((*it).description()).mid(0, MAX_CHAR_CLIP) + "
"; - ammount++; + if (!(*it).isCompleted()){ + count +=1; + // not the overdues, we allready got them, and not if we are + // over the maxlines + if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) { + QString desc = (*it).summary(); + if( desc.isEmpty() ) { + desc = (*it).description(); + } + tmpout += "-" + desc.mid(0, MAX_CHAR_CLIP) + "
"; + ammount++; + } } - } } @@ -444,8 +450,8 @@ void Today::editCard() { * launches datebook */ void Today::startDatebook() { - QCopEnvelope e("QPE/System", "execute(QString)"); - e << QString("datebook"); + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString("datebook"); } /* -- cgit v0.9.0.2