-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 24 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 36 |
2 files changed, 31 insertions, 29 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h index 6f46652..3680ded 100644 --- a/libopie2/opiepim/backend/obackendfactory.h +++ b/libopie2/opiepim/backend/obackendfactory.h | |||
@@ -36,6 +36,3 @@ | |||
36 | 36 | ||
37 | #include <qstring.h> | 37 | /* OPIE */ |
38 | #include <qasciidict.h> | ||
39 | #include <qpe/config.h> | ||
40 | |||
41 | #include <opie2/opimaccessbackend.h> | 38 | #include <opie2/opimaccessbackend.h> |
@@ -47,2 +44,3 @@ | |||
47 | #include <opie2/odatebookaccessbackend_xml.h> | 44 | #include <opie2/odatebookaccessbackend_xml.h> |
45 | #include <opie2/odebug.h> | ||
48 | 46 | ||
@@ -54,2 +52,10 @@ | |||
54 | 52 | ||
53 | #include <qpe/config.h> | ||
54 | |||
55 | /* QT */ | ||
56 | #include <qstring.h> | ||
57 | #include <qasciidict.h> | ||
58 | |||
59 | |||
60 | |||
55 | using namespace Opie; | 61 | using namespace Opie; |
@@ -92,3 +98,3 @@ class OBackendFactory | |||
92 | const QString& appName, const QString& filename = QString::null ){ | 98 | const QString& appName, const QString& filename = QString::null ){ |
93 | qWarning("Selected backend for %d is: %d", type, database ); | 99 | owarn << "Selected backend for " << type << " is: " << database << oendl; |
94 | // If we should use the dafult database style, we have to request it | 100 | // If we should use the dafult database style, we have to request it |
@@ -110,3 +116,3 @@ class OBackendFactory | |||
110 | #else | 116 | #else |
111 | qWarning ("OBackendFactory:: sql Backend for TODO not implemented! Using XML instead!"); | 117 | owarn << "OBackendFactory:: sql Backend for TODO not implemented! Using XML instead!" << oendl; |
112 | // Fall through !! | 118 | // Fall through !! |
@@ -129,3 +135,3 @@ class OBackendFactory | |||
129 | #else | 135 | #else |
130 | qWarning ("OBackendFactory:: sql Backend for CONTACT not implemented! Using XML instead!"); | 136 | owarn << "OBackendFactory:: sql Backend for CONTACT not implemented! Using XML instead!" << oendl; |
131 | // Fall through !! | 137 | // Fall through !! |
@@ -148,3 +154,3 @@ class OBackendFactory | |||
148 | #else | 154 | #else |
149 | qWarning("OBackendFactory:: sql Backend for DATEBOOK not implemented! Using XML instead!"); | 155 | owarn << "OBackendFactory:: sql Backend for DATEBOOK not implemented! Using XML instead!" << oendl; |
150 | // Fall through !! | 156 | // Fall through !! |
@@ -155,3 +161,3 @@ class OBackendFactory | |||
155 | case OPimGlobal::VCARD: | 161 | case OPimGlobal::VCARD: |
156 | qWarning("OBackendFactory:: VCal Backend for DATEBOOK not implemented!"); | 162 | owarn << "OBackendFactory:: VCal Backend for DATEBOOK not implemented!" << oendl; |
157 | return (T*) NULL; | 163 | return (T*) NULL; |
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 | |||
@@ -139,4 +139,4 @@ bool OPimContactAccessBackend_XML::save() | |||
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... |
@@ -280,6 +280,4 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu | |||
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 ){ |
@@ -288,3 +286,3 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu | |||
288 | allcorrect = false; | 286 | allcorrect = false; |
289 | qWarning (" Nope!.."); | 287 | owarn << " Nope!.." << oendl; |
290 | } | 288 | } |
@@ -609,4 +607,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool 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(); |
@@ -620,4 +618,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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(); |
@@ -628,4 +626,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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; |
@@ -638,3 +636,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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 | ||
@@ -664,3 +662,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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; |
@@ -689,4 +687,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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; |
@@ -694,7 +691,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal | |||
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; |