Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 3a72881..5fe733c 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -23,3 +23,3 @@ OTodoAccessXML::~OTodoAccessXML() { | |||
23 | bool OTodoAccessXML::load() { | 23 | bool OTodoAccessXML::load() { |
24 | m_opened = false; | 24 | m_opened = true; |
25 | m_changed = false; | 25 | m_changed = false; |
@@ -71,3 +71,3 @@ bool OTodoAccessXML::load() { | |||
71 | }else { | 71 | }else { |
72 | qWarning("could not parse"); | 72 | // qWarning("could not parse"); |
73 | return false;; | 73 | return false;; |
@@ -76,4 +76,3 @@ bool OTodoAccessXML::load() { | |||
76 | 76 | ||
77 | m_opened = true; | 77 | // qWarning("Access %d" + m_events.count() ); |
78 | qWarning("Access %d" + m_events.count() ); | ||
79 | return true; | 78 | return true; |
@@ -84,4 +83,7 @@ bool OTodoAccessXML::reload() { | |||
84 | bool OTodoAccessXML::save() { | 83 | bool OTodoAccessXML::save() { |
85 | if (!m_opened || !m_changed ) | 84 | // qWarning("saving"); |
85 | if (!m_opened || !m_changed ) { | ||
86 | // qWarning("not saving"); | ||
86 | return true; | 87 | return true; |
88 | } | ||
87 | QString strNewFile = m_file + ".new"; | 89 | QString strNewFile = m_file + ".new"; |
@@ -124,3 +126,3 @@ bool OTodoAccessXML::save() { | |||
124 | if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { | 126 | if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { |
125 | qWarning("error renaming"); | 127 | // qWarning("error renaming"); |
126 | QFile::remove( strNewFile ); | 128 | QFile::remove( strNewFile ); |
@@ -162,2 +164,3 @@ void OTodoAccessXML::clear() { | |||
162 | bool OTodoAccessXML::add( const OTodo& todo ) { | 164 | bool OTodoAccessXML::add( const OTodo& todo ) { |
165 | // qWarning("add"); | ||
163 | m_changed = true; | 166 | m_changed = true; |
@@ -219,3 +222,3 @@ QArray<int> OTodoAccessXML::overDue() { | |||
219 | OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)const { | 222 | OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)const { |
220 | qWarning("parse to do from XMLElement" ); | 223 | // qWarning("parse to do from XMLElement" ); |
221 | OTodo ev; | 224 | OTodo ev; |
@@ -230,3 +233,3 @@ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)con | |||
230 | if (!find ) { | 233 | if (!find ) { |
231 | qWarning("Unknown option" + it.key() ); | 234 | // qWarning("Unknown option" + it.key() ); |
232 | ev.setCustomField( it.key(), it.data() ); | 235 | ev.setCustomField( it.key(), it.data() ); |
@@ -322,2 +325,3 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
322 | } | 325 | } |
326 | // qWarning( "Uid %d", ev.uid() ); | ||
323 | str += "Uid=\"" + QString::number( ev.uid() ) + "\" "; | 327 | str += "Uid=\"" + QString::number( ev.uid() ) + "\" "; |