summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index 1c21619..1b5af2f 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -14,12 +14,15 @@
14 * 14 *
15 * ===================================================================== 15 * =====================================================================
16 * Version: $Id$ 16 * Version: $Id$
17 * ===================================================================== 17 * =====================================================================
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.8 2003/08/30 15:28:26 eilers
21 * Removed some unimportant debug output which causes slow down..
22 *
20 * Revision 1.7 2003/08/01 12:30:16 eilers 23 * Revision 1.7 2003/08/01 12:30:16 eilers
21 * Merging changes from BRANCH_1_0 to HEAD 24 * Merging changes from BRANCH_1_0 to HEAD
22 * 25 *
23 * Revision 1.6 2003/07/07 16:19:47 eilers 26 * Revision 1.6 2003/07/07 16:19:47 eilers
24 * Fixing serious bug in hasQuerySettings() 27 * Fixing serious bug in hasQuerySettings()
25 * 28 *
@@ -167,13 +170,13 @@ bool OContactAccessBackend_XML::save()
167 idx_offset += cstr.length(); 170 idx_offset += cstr.length();
168 out = ""; 171 out = "";
169 172
170 // Write all contacts 173 // Write all contacts
171 QListIterator<OContact> it( m_contactList ); 174 QListIterator<OContact> it( m_contactList );
172 for ( ; it.current(); ++it ) { 175 for ( ; it.current(); ++it ) {
173 qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset ); 176 // qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset );
174 out += "<Contact "; 177 out += "<Contact ";
175 (*it)->save( out ); 178 (*it)->save( out );
176 out += "/>\n"; 179 out += "/>\n";
177 cstr = out.utf8(); 180 cstr = out.utf8();
178 total_written = f.writeBlock( cstr.data(), cstr.length() ); 181 total_written = f.writeBlock( cstr.data(), cstr.length() );
179 idx_offset += cstr.length(); 182 idx_offset += cstr.length();
@@ -699,13 +702,13 @@ bool OContactAccessBackend_XML::load( const QString filename, bool isJournal )
699 for( it = aMap.begin(); it != aMap.end(); ++it ){ 702 for( it = aMap.begin(); it != aMap.end(); ++it ){
700 // qWarning ("Read Attribute: %s=%s", it.key().latin1(),it.data().latin1()); 703 // qWarning ("Read Attribute: %s=%s", it.key().latin1(),it.data().latin1());
701 704
702 int *find = dict[ it.key() ]; 705 int *find = dict[ it.key() ];
703 /* Unknown attributes will be stored as "Custom" elements */ 706 /* Unknown attributes will be stored as "Custom" elements */
704 if ( !find ) { 707 if ( !find ) {
705 qWarning("Attribute %s not known.", it.key().latin1()); 708 // qWarning("Attribute %s not known.", it.key().latin1());
706 //contact.setCustomField(it.key(), it.data()); 709 //contact.setCustomField(it.key(), it.data());
707 customMap.insert( it.key(), it.data() ); 710 customMap.insert( it.key(), it.data() );
708 continue; 711 continue;
709 } 712 }
710 713
711 /* Check if special conversion is needed and add attribute 714 /* Check if special conversion is needed and add attribute