Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 18113c2..5df7253 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp @@ -109,5 +109,4 @@ bool OPimContactAccessBackend_XML::save() QListIterator<OPimContact> it( m_contactList ); for ( ; it.current(); ++it ) { - // owarn << " Uid " << (*it)->uid() << " at Offset: " << idx_offset << "" << oendl; out += "<Contact "; (*it)->save( out ); @@ -138,6 +137,4 @@ bool OPimContactAccessBackend_XML::save() // because, I don't feel like using QDir. if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) { - owarn << "problem renaming file " << strNewFile << " to " << m_journalName - << ", errno: " << errno << oendl; // remove the tmp file... QFile::remove( strNewFile ); @@ -214,7 +211,6 @@ OPimContact OPimContactAccessBackend_XML::find ( int uid ) const QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &query, int settings, - const QDateTime& d ) + const QDateTime& d )const { - QArray<int> m_currentQuery( m_contactList.count() ); QListIterator<OPimContact> it( m_contactList ); @@ -279,11 +275,8 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu // the current/given date and the maximum date // ( maximum time range ) ! - owarn << "Checking if " << checkDate->toString() << " is between " << current.toString() - << " and " << queryDate->toString() << " ! " << oendl; if ( current.daysTo( *queryDate ) >= 0 ){ if ( !( ( *checkDate >= current ) && ( *checkDate <= *queryDate ) ) ){ allcorrect = false; - owarn << " Nope!.." << oendl; } } @@ -431,4 +424,5 @@ bool OPimContactAccessBackend_XML::hasQuerySettings (uint querySettings) const } +#if 0 // Currently only asc implemented.. QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int ) @@ -459,8 +453,9 @@ QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int ) } +#endif + bool OPimContactAccessBackend_XML::add ( const OPimContact &newcontact ) { - //owarn << "odefaultbackend: ACTION::ADD" << oendl; updateJournal (newcontact, ACTION_ADD); addContact_p( newcontact ); @@ -486,6 +481,4 @@ bool OPimContactAccessBackend_XML::replace ( const OPimContact &contact ) m_uidToContact.insert( QString().setNum( newCont->uid() ), newCont ); - owarn << "Nur zur Sicherheit: " << contact.uid() << " == " << newCont->uid() << " ?" << oendl; - return true; } else @@ -592,6 +585,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal dict.insert( "actionrow", new int(JOURNALROW) ); - //owarn << "OPimContactDefaultBackEnd::loading " << filename << "" << oendl; - XMLElement *root = XMLElement::load( filename ); if(root != 0l ){ // start parsing @@ -600,5 +591,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal */ XMLElement *element = root->firstChild(); - //owarn << "OPimContactAccess::load tagName(): " << root->tagName() << "" << oendl; element = element ? element->firstChild() : 0; @@ -606,6 +596,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal while( element && !isJournal ){ if( element->tagName() != QString::fromLatin1("Contacts") ){ - //owarn << "OPimContactDefBack::Searching for Tag \"Contacts\"! Found: " - // << element->tagName() << oendl; element = element->nextChild(); } else { @@ -617,6 +605,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal while( element ){ if( element->tagName() != QString::fromLatin1("Contact") ){ - //owarn << "OPimContactDefBack::Searching for Tag \"Contact\"! Found: " - // << element->tagName() << oendl; element = element->nextChild(); continue; @@ -625,6 +611,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal * attributes contained */ - //owarn << "OPimContactDefBack::load element tagName() : " - // << element->tagName() << oendl; QString dummy; foundAction = false; @@ -635,10 +619,7 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal customMap.clear(); for( it = aMap.begin(); it != aMap.end(); ++it ){ - // owarn << "Read Attribute: " << it.key() << "=" << it.data() << oendl; - int *find = dict[ it.key() ]; /* Unknown attributes will be stored as "Custom" elements */ if ( !find ) { - // owarn << "Attribute " << it.key() << " not known." << oendl; //contact.setCustomField(it.key(), it.data()); customMap.insert( it.key(), it.data() ); @@ -705,8 +686,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal } }else { - owarn << "ODefBack::could not load" << oendl; } delete root; - owarn << "returning from loading" << oendl; return true; } |