-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 13 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 13 |
2 files changed, 16 insertions, 10 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 7a55c67..385fd27 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -118,3 +118,11 @@ bool OTodoAccessXML::load() { */ + if (m_events.contains( ev.uid() ) || ev.uid() == 0) { + ev.setUid( 1 ); + m_changed = true; + } + if ( ev.hasDueDate() ) { + ev.setDueDate( QDate(m_year, m_month, m_day) ); + } m_events.insert(ev.uid(), ev ); + m_year = m_month = m_day = -1; } @@ -341,7 +349,2 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, } - - if ( ev.hasDueDate() ) { - QDate date( m_year, m_month, m_day ); - ev.setDueDate( date ); - } } diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 7a55c67..385fd27 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp @@ -118,3 +118,11 @@ bool OTodoAccessXML::load() { */ + if (m_events.contains( ev.uid() ) || ev.uid() == 0) { + ev.setUid( 1 ); + m_changed = true; + } + if ( ev.hasDueDate() ) { + ev.setDueDate( QDate(m_year, m_month, m_day) ); + } m_events.insert(ev.uid(), ev ); + m_year = m_month = m_day = -1; } @@ -341,7 +349,2 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, } - - if ( ev.hasDueDate() ) { - QDate date( m_year, m_month, m_day ); - ev.setDueDate( date ); - } } |