summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index 7b4d81f..5ffcb11 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -30,8 +30,17 @@
* XML Backend for the OPIE-Contact Database.
*/
+
+/* OPIE */
#include <opie2/ocontactaccessbackend_xml.h>
+#include <opie2/xmltree.h>
+#include <opie2/ocontactaccessbackend.h>
+#include <opie2/ocontactaccess.h>
+#include <opie2/odebug.h>
+
+#include <qpe/global.h>
+/* QT */
#include <qasciidict.h>
#include <qfile.h>
#include <qfileinfo.h>
@@ -39,12 +48,7 @@
#include <qarray.h>
#include <qmap.h>
-#include <qpe/global.h>
-
-#include <opie2/xmltree.h>
-#include <opie2/ocontactaccessbackend.h>
-#include <opie2/ocontactaccess.h>
-
+/* STD */
#include <stdlib.h>
#include <errno.h>
@@ -104,7 +108,7 @@ bool OPimContactAccessBackend_XML::save()
// Write all contacts
QListIterator<OPimContact> it( m_contactList );
for ( ; it.current(); ++it ) {
- // qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset );
+ // owarn << " Uid " << (*it)->uid() << " at Offset: " << idx_offset << "" << oendl;
out += "<Contact ";
(*it)->save( out );
out += "/>\n";
@@ -459,7 +463,7 @@ QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int )
bool OPimContactAccessBackend_XML::add ( const OPimContact &newcontact )
{
- //qWarning("odefaultbackend: ACTION::ADD");
+ //owarn << "odefaultbackend: ACTION::ADD" << oendl;
updateJournal (newcontact, ACTION_ADD);
addContact_p( newcontact );
@@ -483,7 +487,7 @@ bool OPimContactAccessBackend_XML::replace ( const OPimContact &contact )
m_uidToContact.remove( QString().setNum( contact.uid() ) );
m_uidToContact.insert( QString().setNum( newCont->uid() ), newCont );
- qWarning("Nur zur Sicherheit: %d == %d ?",contact.uid(), newCont->uid());
+ owarn << "Nur zur Sicherheit: " << contact.uid() << " == " << newCont->uid() << " ?" << oendl;
return true;
} else
@@ -589,7 +593,7 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
dict.insert( "action", new int(JOURNALACTION) );
dict.insert( "actionrow", new int(JOURNALROW) );
- //qWarning( "OPimContactDefaultBackEnd::loading %s", filename.latin1() );
+ //owarn << "OPimContactDefaultBackEnd::loading " << filename << "" << oendl;
XMLElement *root = XMLElement::load( filename );
if(root != 0l ){ // start parsing
@@ -597,7 +601,7 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
* Contact-Class
*/
XMLElement *element = root->firstChild();
- //qWarning("OPimContactAccess::load tagName(): %s", root->tagName().latin1() );
+ //owarn << "OPimContactAccess::load tagName(): " << root->tagName() << "" << oendl;
element = element->firstChild();
/* Search Tag "Contacts" which is the parent of all Contacts */
@@ -637,7 +641,7 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
int *find = dict[ it.key() ];
/* Unknown attributes will be stored as "Custom" elements */
if ( !find ) {
- // qWarning("Attribute %s not known.", it.key().latin1());
+ // owarn << "Attribute " << it.key() << " not known." << oendl;
//contact.setCustomField(it.key(), it.data());
customMap.insert( it.key(), it.data() );
continue;
@@ -704,10 +708,10 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
element = element->nextChild();
}
}else {
- qWarning("ODefBack::could not load");
+ owarn << "ODefBack::could not load" << oendl;
}
delete root;
- qWarning("returning from loading" );
+ owarn << "returning from loading" << oendl;
return true;
}