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.cpp29
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
@@ -110,3 +110,2 @@ bool OPimContactAccessBackend_XML::save()
110 for ( ; it.current(); ++it ) { 110 for ( ; it.current(); ++it ) {
111 // owarn << " Uid " << (*it)->uid() << " at Offset: " << idx_offset << "" << oendl;
112 out += "<Contact "; 111 out += "<Contact ";
@@ -139,4 +138,2 @@ bool OPimContactAccessBackend_XML::save()
139 if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) { 138 if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) {
140 owarn << "problem renaming file " << strNewFile << " to " << m_journalName
141 << ", errno: " << errno << oendl;
142 // remove the tmp file... 139 // remove the tmp file...
@@ -215,5 +212,4 @@ OPimContact OPimContactAccessBackend_XML::find ( int uid ) const
215QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &query, int settings, 212QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &query, int settings,
216 const QDateTime& d ) 213 const QDateTime& d )const
217{ 214{
218
219 QArray<int> m_currentQuery( m_contactList.count() ); 215 QArray<int> m_currentQuery( m_contactList.count() );
@@ -280,4 +276,2 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu
280 // ( maximum time range ) ! 276 // ( maximum time range ) !
281 owarn << "Checking if " << checkDate->toString() << " is between " << current.toString()
282 << " and " << queryDate->toString() << " ! " << oendl;
283 if ( current.daysTo( *queryDate ) >= 0 ){ 277 if ( current.daysTo( *queryDate ) >= 0 ){
@@ -286,3 +280,2 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu
286 allcorrect = false; 280 allcorrect = false;
287 owarn << " Nope!.." << oendl;
288 } 281 }
@@ -432,2 +425,3 @@ bool OPimContactAccessBackend_XML::hasQuerySettings (uint querySettings) const
432 425
426#if 0
433// Currently only asc implemented.. 427// Currently only asc implemented..
@@ -460,2 +454,4 @@ QArray<int> OPimContactAccessBackend_XML::sorted( bool asc, int , int , int )
460} 454}
455#endif
456
461 457
@@ -463,3 +459,2 @@ bool OPimContactAccessBackend_XML::add ( const OPimContact &newcontact )
463{ 459{
464 //owarn << "odefaultbackend: ACTION::ADD" << oendl;
465 updateJournal (newcontact, ACTION_ADD); 460 updateJournal (newcontact, ACTION_ADD);
@@ -487,4 +482,2 @@ bool OPimContactAccessBackend_XML::replace ( const OPimContact &contact )
487 482
488 owarn << "Nur zur Sicherheit: " << contact.uid() << " == " << newCont->uid() << " ?" << oendl;
489
490 return true; 483 return true;
@@ -593,4 +586,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
593 586
594 //owarn << "OPimContactDefaultBackEnd::loading " << filename << "" << oendl;
595
596 XMLElement *root = XMLElement::load( filename ); 587 XMLElement *root = XMLElement::load( filename );
@@ -601,3 +592,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
601 XMLElement *element = root->firstChild(); 592 XMLElement *element = root->firstChild();
602 //owarn << "OPimContactAccess::load tagName(): " << root->tagName() << "" << oendl;
603 element = element ? element->firstChild() : 0; 593 element = element ? element->firstChild() : 0;
@@ -607,4 +597,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
607 if( element->tagName() != QString::fromLatin1("Contacts") ){ 597 if( element->tagName() != QString::fromLatin1("Contacts") ){
608 //owarn << "OPimContactDefBack::Searching for Tag \"Contacts\"! Found: "
609 // << element->tagName() << oendl;
610 element = element->nextChild(); 598 element = element->nextChild();
@@ -618,4 +606,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
618 if( element->tagName() != QString::fromLatin1("Contact") ){ 606 if( element->tagName() != QString::fromLatin1("Contact") ){
619 //owarn << "OPimContactDefBack::Searching for Tag \"Contact\"! Found: "
620 // << element->tagName() << oendl;
621 element = element->nextChild(); 607 element = element->nextChild();
@@ -626,4 +612,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
626 */ 612 */
627 //owarn << "OPimContactDefBack::load element tagName() : "
628 // << element->tagName() << oendl;
629 QString dummy; 613 QString dummy;
@@ -636,4 +620,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
636 for( it = aMap.begin(); it != aMap.end(); ++it ){ 620 for( it = aMap.begin(); it != aMap.end(); ++it ){
637 // owarn << "Read Attribute: " << it.key() << "=" << it.data() << oendl;
638
639 int *find = dict[ it.key() ]; 621 int *find = dict[ it.key() ];
@@ -641,3 +623,2 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
641 if ( !find ) { 623 if ( !find ) {
642 // owarn << "Attribute " << it.key() << " not known." << oendl;
643 //contact.setCustomField(it.key(), it.data()); 624 //contact.setCustomField(it.key(), it.data());
@@ -706,6 +687,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
706 }else { 687 }else {
707 owarn << "ODefBack::could not load" << oendl;
708 } 688 }
709 delete root; 689 delete root;
710 owarn << "returning from loading" << oendl;
711 return true; 690 return true;