author | zecke <zecke> | 2002-09-23 21:38:23 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-23 21:38:23 (UTC) |
commit | e0b04701b3c9182ba22f56e329f98c57af4e1fe2 (patch) (side-by-side diff) | |
tree | d5fa6fbae48d61aca7fefc09375fdcaf99ef4cb5 | |
parent | 47e87e10fada298a1027cf20d4d7f31a66dc1359 (diff) | |
download | opie-e0b04701b3c9182ba22f56e329f98c57af4e1fe2.zip opie-e0b04701b3c9182ba22f56e329f98c57af4e1fe2.tar.gz opie-e0b04701b3c9182ba22f56e329f98c57af4e1fe2.tar.bz2 |
Updates
-rw-r--r-- | libopie/pim/opimrecord.cpp | 3 | ||||
-rw-r--r-- | libopie/pim/orecordlist.h | 2 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/otodoaccess.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 20 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 20 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/core/otodoaccess.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/orecordlist.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 4 |
10 files changed, 40 insertions, 26 deletions
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp index 60cdbf3..62dc353 100644 --- a/libopie/pim/opimrecord.cpp +++ b/libopie/pim/opimrecord.cpp @@ -121,12 +121,13 @@ QString OPimRecord::crossToString()const { return str; } /* if uid = 1 assign a new one */ void OPimRecord::setUid( int uid ) { - +// qWarning("setting uid" ); if ( uid == 1) uid = uidGen().generate(); +// qWarning(" uid %d", uid); Qtopia::Record::setUid( uid ); }; Qtopia::UidGen &OPimRecord::uidGen() { return m_uidGen; diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h index 36728b8..1795938 100644 --- a/libopie/pim/orecordlist.h +++ b/libopie/pim/orecordlist.h @@ -70,8 +70,10 @@ public: /** * c'tor */ + ORecordList () { + } ORecordList( const QArray<int>& ids, const Base* ); ~ORecordList(); diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index cc46b21..6dd4c0e 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -160,9 +160,9 @@ void OTodo::setHasAlarmDateTime( bool hasAlarmDateTime ) data->hasAlarmDateTime = hasAlarmDateTime; } void OTodo::setDescription(const QString &desc ) { - qWarning( "desc " + desc ); +// qWarning( "desc " + desc ); changeOrModify(); data->desc = Qtopia::simplifyMultiLineSpace(desc ); } void OTodo::setSummary( const QString& sum ) @@ -317,9 +317,9 @@ void OTodo::deref() { } } OTodo &OTodo::operator=(const OTodo &item ) { -// OPimRecord::operator=( item ); + OPimRecord::operator=( item ); //qWarning("operator= ref "); item.data->ref(); deref(); data = item.data; diff --git a/libopie/pim/otodoaccess.cpp b/libopie/pim/otodoaccess.cpp index a65cf5c..8ec09bc 100644 --- a/libopie/pim/otodoaccess.cpp +++ b/libopie/pim/otodoaccess.cpp @@ -14,9 +14,9 @@ OTodoAccess::OTodoAccess( OTodoAccessBackend* end ) setBackEnd( m_todoBackEnd ); } OTodoAccess::~OTodoAccess() { - qWarning("~OTodoAccess"); +// qWarning("~OTodoAccess"); } void OTodoAccess::mergeWith( const QValueList<OTodo>& list ) { QValueList<OTodo>::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { @@ -62,9 +62,9 @@ void OTodoAccess::delAlarm( int uid) { // with the given uid !? // If not: I have to rethink how to remove already // scheduled events... (se) // it should be fine -zecke - qWarning("Removing alarm for event with uid %d", uid ); +// qWarning("Removing alarm for event with uid %d", uid ); AlarmServer::deleteAlarm( schedule , "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); } diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 3a72881..5fe733c 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -20,9 +20,9 @@ OTodoAccessXML::OTodoAccessXML( const QString& appName, OTodoAccessXML::~OTodoAccessXML() { } bool OTodoAccessXML::load() { - m_opened = false; + m_opened = true; m_changed = false; /* initialize dict */ /* * UPDATE dict if you change anything!!! @@ -68,23 +68,25 @@ bool OTodoAccessXML::load() { element = element->nextChild(); } }else { - qWarning("could not parse"); +// qWarning("could not parse"); return false;; } delete root; - m_opened = true; - qWarning("Access %d" + m_events.count() ); +// qWarning("Access %d" + m_events.count() ); return true; } bool OTodoAccessXML::reload() { return load(); } 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"; QFile f( strNewFile ); if (!f.open( IO_WriteOnly|IO_Raw ) ) return false; @@ -121,9 +123,9 @@ bool OTodoAccessXML::save() { /* flush before renaming */ f.close(); if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { - qWarning("error renaming"); +// qWarning("error renaming"); QFile::remove( strNewFile ); } m_changed = false; @@ -159,8 +161,9 @@ void OTodoAccessXML::clear() { m_events.clear(); } bool OTodoAccessXML::add( const OTodo& todo ) { +// qWarning("add"); m_changed = true; m_events.insert( todo.uid(), todo ); return true; @@ -216,9 +219,9 @@ QArray<int> OTodoAccessXML::overDue() { /* private */ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)const { - qWarning("parse to do from XMLElement" ); +// qWarning("parse to do from XMLElement" ); OTodo ev; QMap<QString, QString> attributes = element->attributes(); QMap<QString, QString>::Iterator it; @@ -227,9 +230,9 @@ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)con day = month = year = -1; for ( it = attributes.begin(); it != attributes.end(); ++it ) { find = (*dict)[ it.key() ]; if (!find ) { - qWarning("Unknown option" + it.key() ); +// qWarning("Unknown option" + it.key() ); ev.setCustomField( it.key(), it.data() ); continue; } @@ -319,8 +322,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { str += "DateYear=\"" + QString::number( ev.dueDate().year() ) + "\" "; str += "DateMonth=\"" + QString::number( ev.dueDate().month() ) + "\" "; str += "DateDay=\"" + QString::number( ev.dueDate().day() ) + "\" "; } +// qWarning( "Uid %d", ev.uid() ); str += "Uid=\"" + QString::number( ev.uid() ) + "\" "; // append the extra options /* FIXME Qtopia::Record this is currently not 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 @@ -20,9 +20,9 @@ OTodoAccessXML::OTodoAccessXML( const QString& appName, OTodoAccessXML::~OTodoAccessXML() { } bool OTodoAccessXML::load() { - m_opened = false; + m_opened = true; m_changed = false; /* initialize dict */ /* * UPDATE dict if you change anything!!! @@ -68,23 +68,25 @@ bool OTodoAccessXML::load() { element = element->nextChild(); } }else { - qWarning("could not parse"); +// qWarning("could not parse"); return false;; } delete root; - m_opened = true; - qWarning("Access %d" + m_events.count() ); +// qWarning("Access %d" + m_events.count() ); return true; } bool OTodoAccessXML::reload() { return load(); } 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"; QFile f( strNewFile ); if (!f.open( IO_WriteOnly|IO_Raw ) ) return false; @@ -121,9 +123,9 @@ bool OTodoAccessXML::save() { /* flush before renaming */ f.close(); if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { - qWarning("error renaming"); +// qWarning("error renaming"); QFile::remove( strNewFile ); } m_changed = false; @@ -159,8 +161,9 @@ void OTodoAccessXML::clear() { m_events.clear(); } bool OTodoAccessXML::add( const OTodo& todo ) { +// qWarning("add"); m_changed = true; m_events.insert( todo.uid(), todo ); return true; @@ -216,9 +219,9 @@ QArray<int> OTodoAccessXML::overDue() { /* private */ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)const { - qWarning("parse to do from XMLElement" ); +// qWarning("parse to do from XMLElement" ); OTodo ev; QMap<QString, QString> attributes = element->attributes(); QMap<QString, QString>::Iterator it; @@ -227,9 +230,9 @@ OTodo OTodoAccessXML::todo( QAsciiDict<int>* dict, Opie::XMLElement* element)con day = month = year = -1; for ( it = attributes.begin(); it != attributes.end(); ++it ) { find = (*dict)[ it.key() ]; if (!find ) { - qWarning("Unknown option" + it.key() ); +// qWarning("Unknown option" + it.key() ); ev.setCustomField( it.key(), it.data() ); continue; } @@ -319,8 +322,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { str += "DateYear=\"" + QString::number( ev.dueDate().year() ) + "\" "; str += "DateMonth=\"" + QString::number( ev.dueDate().month() ) + "\" "; str += "DateDay=\"" + QString::number( ev.dueDate().day() ) + "\" "; } +// qWarning( "Uid %d", ev.uid() ); str += "Uid=\"" + QString::number( ev.uid() ) + "\" "; // append the extra options /* FIXME Qtopia::Record this is currently not diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index 60cdbf3..62dc353 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp @@ -121,12 +121,13 @@ QString OPimRecord::crossToString()const { return str; } /* if uid = 1 assign a new one */ void OPimRecord::setUid( int uid ) { - +// qWarning("setting uid" ); if ( uid == 1) uid = uidGen().generate(); +// qWarning(" uid %d", uid); Qtopia::Record::setUid( uid ); }; Qtopia::UidGen &OPimRecord::uidGen() { return m_uidGen; diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp index a65cf5c..8ec09bc 100644 --- a/libopie2/opiepim/core/otodoaccess.cpp +++ b/libopie2/opiepim/core/otodoaccess.cpp @@ -14,9 +14,9 @@ OTodoAccess::OTodoAccess( OTodoAccessBackend* end ) setBackEnd( m_todoBackEnd ); } OTodoAccess::~OTodoAccess() { - qWarning("~OTodoAccess"); +// qWarning("~OTodoAccess"); } void OTodoAccess::mergeWith( const QValueList<OTodo>& list ) { QValueList<OTodo>::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { @@ -62,9 +62,9 @@ void OTodoAccess::delAlarm( int uid) { // with the given uid !? // If not: I have to rethink how to remove already // scheduled events... (se) // it should be fine -zecke - qWarning("Removing alarm for event with uid %d", uid ); +// qWarning("Removing alarm for event with uid %d", uid ); AlarmServer::deleteAlarm( schedule , "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); } diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h index 36728b8..1795938 100644 --- a/libopie2/opiepim/orecordlist.h +++ b/libopie2/opiepim/orecordlist.h @@ -70,8 +70,10 @@ public: /** * c'tor */ + ORecordList () { + } ORecordList( const QArray<int>& ids, const Base* ); ~ORecordList(); diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index cc46b21..6dd4c0e 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -160,9 +160,9 @@ void OTodo::setHasAlarmDateTime( bool hasAlarmDateTime ) data->hasAlarmDateTime = hasAlarmDateTime; } void OTodo::setDescription(const QString &desc ) { - qWarning( "desc " + desc ); +// qWarning( "desc " + desc ); changeOrModify(); data->desc = Qtopia::simplifyMultiLineSpace(desc ); } void OTodo::setSummary( const QString& sum ) @@ -317,9 +317,9 @@ void OTodo::deref() { } } OTodo &OTodo::operator=(const OTodo &item ) { -// OPimRecord::operator=( item ); + OPimRecord::operator=( item ); //qWarning("operator= ref "); item.data->ref(); deref(); data = item.data; |