-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() { bool OTodoAccessXML::load() { - m_opened = false; + m_opened = true; m_changed = false; @@ -71,3 +71,3 @@ bool OTodoAccessXML::load() { }else { - qWarning("could not parse"); +// qWarning("could not parse"); return false;; @@ -76,4 +76,3 @@ bool OTodoAccessXML::load() { - m_opened = true; - qWarning("Access %d" + m_events.count() ); +// qWarning("Access %d" + m_events.count() ); return true; @@ -84,4 +83,7 @@ bool OTodoAccessXML::reload() { bool OTodoAccessXML::save() { - if (!m_opened || !m_changed ) +// qWarning("saving"); + if (!m_opened || !m_changed ) { +// qWarning("not saving"); return true; + } QString strNewFile = m_file + ".new"; @@ -124,3 +126,3 @@ bool OTodoAccessXML::save() { if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { - qWarning("error renaming"); +// qWarning("error renaming"); QFile::remove( strNewFile ); @@ -162,2 +164,3 @@ void OTodoAccessXML::clear() { bool OTodoAccessXML::add( const OTodo& todo ) { +// qWarning("add"); m_changed = true; @@ -219,3 +222,3 @@ QArray<int> OTodoAccessXML::overDue() { OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)const { - qWarning("parse to do from XMLElement" ); +// qWarning("parse to do from XMLElement" ); OTodo ev; @@ -230,3 +233,3 @@ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)con if (!find ) { - qWarning("Unknown option" + it.key() ); +// qWarning("Unknown option" + it.key() ); ev.setCustomField( it.key(), it.data() ); @@ -322,2 +325,3 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { } +// qWarning( "Uid %d", ev.uid() ); str += "Uid=\"" + QString::number( ev.uid() ) + "\" "; |