-rw-r--r-- | libopie/pim/otodo.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index 38b93f7..5a18c37 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -23,16 +23,21 @@ struct OTodo::OTodoData : public QShared { OTodoData() : QShared() { recur = 0; state = 0; maintainer = 0; notifiers = 0; }; + ~OTodoData() { + delete recur; + delete maintainer; + delete notifiers; + } QDate date; bool isCompleted:1; bool hasDate:1; int priority; QString desc; QString sum; QMap<QString, QString> extra; @@ -269,34 +274,33 @@ QString OTodo::toShortText() const { Returns a richt text string */ QString OTodo::toRichText() const { QString text; QStringList catlist; // summary - text += "<b><h3><img src=\"todo/TodoList\">"; + text += "<b><h3><img src=\"todo/TodoList\"> "; if ( !summary().isEmpty() ) { text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" ); } text += "</h3></b><br><hr><br>"; // description if( !description().isEmpty() ){ - text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; - text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; + text += "<b>" + QObject::tr( "Notes:" ) + "</b><br>"; + text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; } // priority int priorityval = priority(); text += "<b>" + QObject::tr( "Priority:") +" </b><img src=\"todo/priority" + - QString::number( priorityval ) + "\">"; -// text += "<b>" + QObject::tr( "Priority:") +"</b><img src=\"todo/priority" + -// QString::number( priority() ) + "\"><br>"; + QString::number( priorityval ) + "\"> "; + switch ( priorityval ) { case 1 : text += QObject::tr( "Very high" ); break; case 2 : text += QObject::tr( "High" ); break; case 3 : text += QObject::tr( "Normal" ); break; |