-rw-r--r-- | libopie/tododb.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libopie/tododb.cpp b/libopie/tododb.cpp index fe8b8bf..6b10ec2 100644 --- a/libopie/tododb.cpp +++ b/libopie/tododb.cpp @@ -14,4 +14,5 @@ class FileToDoResource : public ToDoResource { public: FileToDoResource() {}; + // FIXME better parsing bool save(const QString &name, const QValueList<ToDoEvent> &m_todos ){ // prepare the XML @@ -24,4 +25,5 @@ public: map.insert( "HasDate", QString::number((int)(*it).hasDate() ) ); map.insert( "Priority", QString::number( (*it).priority() ) ); + map.insert( "Summary", (*it).summary() ); QArray<int> arrat = (*it).categories(); QString attr; @@ -112,9 +114,11 @@ public: dummy = element->attribute("Description" ); event.setDescription( dummy ); + dummy = element->attribute("Summary" ); + event.setSummary( dummy ); // category dummy = element->attribute("Categories" ); QStringList ids = QStringList::split(";", dummy ); - event.setCategories( ids ); - + event.setCategories( ids ); + //uid dummy = element->attribute("Uid" ); @@ -182,5 +186,5 @@ QValueList<ToDoEvent> ToDoDB::overDue() { QValueList<ToDoEvent> events; - for( QValueList<ToDoEvent>::Iterator it = m_todos.begin(); it!= m_todos.end(); ++it ){ + for( QValueList<ToDoEvent>::Iterator it = m_todos.begin(); it!= m_todos.end(); ++it ){ if( (*it).isOverdue() ) events.append((*it) ); @@ -239,5 +243,5 @@ QString ToDoDB::fileName()const void ToDoDB::load() { - m_todos = m_res->load( m_fileName ); + m_todos = m_res->load( m_fileName ); } bool ToDoDB::save() |