Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 5ffcb11..00d62ee 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | |||
@@ -138,6 +138,6 @@ bool OPimContactAccessBackend_XML::save() | |||
138 | // because, I don't feel like using QDir. | 138 | // because, I don't feel like using QDir. |
139 | if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) { | 139 | if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) { |
140 | qWarning( "problem renaming file %s to %s, errno: %d", | 140 | owarn << "problem renaming file " << strNewFile << " to " << m_journalName |
141 | strNewFile.latin1(), m_journalName.latin1(), errno ); | 141 | << ", errno: " << errno << oendl; |
142 | // remove the tmp file... | 142 | // remove the tmp file... |
143 | QFile::remove( strNewFile ); | 143 | QFile::remove( strNewFile ); |
@@ -279,13 +279,11 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu | |||
279 | // the current/given date and the maximum date | 279 | // the current/given date and the maximum date |
280 | // ( maximum time range ) ! | 280 | // ( maximum time range ) ! |
281 | qWarning("Checking if %s is between %s and %s ! ", | 281 | owarn << "Checking if " << checkDate->toString() << " is between " << current.toString() |
282 | checkDate->toString().latin1(), | 282 | << " and " << queryDate->toString() << " ! " << oendl; |
283 | current.toString().latin1(), | ||
284 | queryDate->toString().latin1() ); | ||
285 | if ( current.daysTo( *queryDate ) >= 0 ){ | 283 | if ( current.daysTo( *queryDate ) >= 0 ){ |
286 | if ( !( ( *checkDate >= current ) && | 284 | if ( !( ( *checkDate >= current ) && |
287 | ( *checkDate <= *queryDate ) ) ){ | 285 | ( *checkDate <= *queryDate ) ) ){ |
288 | allcorrect = false; | 286 | allcorrect = false; |
289 | qWarning (" Nope!.."); | 287 | owarn << " Nope!.." << oendl; |
290 | } | 288 | } |
291 | } | 289 | } |
@@ -608,6 +606,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
608 | while( element && !isJournal ){ | 606 | while( element && !isJournal ){ |
609 | if( element->tagName() != QString::fromLatin1("Contacts") ){ | 607 | if( element->tagName() != QString::fromLatin1("Contacts") ){ |
610 | //qWarning ("OPimContactDefBack::Searching for Tag \"Contacts\"! Found: %s", | 608 | //owarn << "OPimContactDefBack::Searching for Tag \"Contacts\"! Found: " |
611 | // element->tagName().latin1()); | 609 | // << element->tagName() << oendl; |
612 | element = element->nextChild(); | 610 | element = element->nextChild(); |
613 | } else { | 611 | } else { |
@@ -619,6 +617,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
619 | while( element ){ | 617 | while( element ){ |
620 | if( element->tagName() != QString::fromLatin1("Contact") ){ | 618 | if( element->tagName() != QString::fromLatin1("Contact") ){ |
621 | //qWarning ("OPimContactDefBack::Searching for Tag \"Contact\"! Found: %s", | 619 | //owarn << "OPimContactDefBack::Searching for Tag \"Contact\"! Found: " |
622 | // element->tagName().latin1()); | 620 | // << element->tagName() << oendl; |
623 | element = element->nextChild(); | 621 | element = element->nextChild(); |
624 | continue; | 622 | continue; |
@@ -627,6 +625,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
627 | * attributes contained | 625 | * attributes contained |
628 | */ | 626 | */ |
629 | //qWarning("OPimContactDefBack::load element tagName() : %s", | 627 | //owarn << "OPimContactDefBack::load element tagName() : " |
630 | // element->tagName().latin1() ); | 628 | // << element->tagName() << oendl; |
631 | QString dummy; | 629 | QString dummy; |
632 | foundAction = false; | 630 | foundAction = false; |
@@ -637,5 +635,5 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
637 | customMap.clear(); | 635 | customMap.clear(); |
638 | for( it = aMap.begin(); it != aMap.end(); ++it ){ | 636 | for( it = aMap.begin(); it != aMap.end(); ++it ){ |
639 | // qWarning ("Read Attribute: %s=%s", it.key().latin1(),it.data().latin1()); | 637 | // owarn << "Read Attribute: " << it.key() << "=" << it.data() << oendl; |
640 | 638 | ||
641 | int *find = dict[ it.key() ]; | 639 | int *find = dict[ it.key() ]; |
@@ -663,5 +661,5 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
663 | action = journal_action(it.data().toInt()); | 661 | action = journal_action(it.data().toInt()); |
664 | foundAction = true; | 662 | foundAction = true; |
665 | qWarning ("ODefBack(journal)::ACTION found: %d", action); | 663 | owarn << "ODefBack(journal)::ACTION found: " << action << oendl; |
666 | break; | 664 | break; |
667 | case JOURNALROW: | 665 | case JOURNALROW: |
@@ -688,14 +686,12 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
688 | case ACTION_REMOVE: | 686 | case ACTION_REMOVE: |
689 | if ( !remove (contact.uid()) ) | 687 | if ( !remove (contact.uid()) ) |
690 | qWarning ("ODefBack(journal)::Unable to remove uid: %d", | 688 | owarn << "ODefBack(journal)::Unable to remove uid: " << contact.uid() << oendl; |
691 | contact.uid() ); | ||
692 | break; | 689 | break; |
693 | case ACTION_REPLACE: | 690 | case ACTION_REPLACE: |
694 | if ( !replace ( contact ) ) | 691 | if ( !replace ( contact ) ) |
695 | qWarning ("ODefBack(journal)::Unable to replace uid: %d", | 692 | owarn << "ODefBack(journal)::Unable to replace uid: " << contact.uid() << oendl; |
696 | contact.uid() ); | ||
697 | break; | 693 | break; |
698 | default: | 694 | default: |
699 | qWarning ("Unknown action: ignored !"); | 695 | owarn << "Unknown action: ignored !" << oendl; |
700 | break; | 696 | break; |
701 | } | 697 | } |