summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h24
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp36
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 @@
-#include <qstring.h>
-#include <qasciidict.h>
-#include <qpe/config.h>
-
+/* OPIE */
#include <opie2/opimaccessbackend.h>
@@ -47,2 +44,3 @@
#include <opie2/odatebookaccessbackend_xml.h>
+#include <opie2/odebug.h>
@@ -54,2 +52,10 @@
+#include <qpe/config.h>
+
+/* QT */
+#include <qstring.h>
+#include <qasciidict.h>
+
+
+
using namespace Opie;
@@ -92,3 +98,3 @@ class OBackendFactory
const QString& appName, const QString& filename = QString::null ){
- qWarning("Selected backend for %d is: %d", type, database );
+ owarn << "Selected backend for " << type << " is: " << database << oendl;
// If we should use the dafult database style, we have to request it
@@ -110,3 +116,3 @@ class OBackendFactory
#else
- qWarning ("OBackendFactory:: sql Backend for TODO not implemented! Using XML instead!");
+ owarn << "OBackendFactory:: sql Backend for TODO not implemented! Using XML instead!" << oendl;
// Fall through !!
@@ -129,3 +135,3 @@ class OBackendFactory
#else
- qWarning ("OBackendFactory:: sql Backend for CONTACT not implemented! Using XML instead!");
+ owarn << "OBackendFactory:: sql Backend for CONTACT not implemented! Using XML instead!" << oendl;
// Fall through !!
@@ -148,3 +154,3 @@ class OBackendFactory
#else
- qWarning("OBackendFactory:: sql Backend for DATEBOOK not implemented! Using XML instead!");
+ owarn << "OBackendFactory:: sql Backend for DATEBOOK not implemented! Using XML instead!" << oendl;
// Fall through !!
@@ -155,3 +161,3 @@ class OBackendFactory
case OPimGlobal::VCARD:
- qWarning("OBackendFactory:: VCal Backend for DATEBOOK not implemented!");
+ owarn << "OBackendFactory:: VCal Backend for DATEBOOK not implemented!" << oendl;
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()
if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) {
- qWarning( "problem renaming file %s to %s, errno: %d",
- strNewFile.latin1(), m_journalName.latin1(), errno );
+ owarn << "problem renaming file " << strNewFile << " to " << m_journalName
+ << ", errno: " << errno << oendl;
// remove the tmp file...
@@ -280,6 +280,4 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu
// ( maximum time range ) !
- qWarning("Checking if %s is between %s and %s ! ",
- checkDate->toString().latin1(),
- current.toString().latin1(),
- queryDate->toString().latin1() );
+ owarn << "Checking if " << checkDate->toString() << " is between " << current.toString()
+ << " and " << queryDate->toString() << " ! " << oendl;
if ( current.daysTo( *queryDate ) >= 0 ){
@@ -288,3 +286,3 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu
allcorrect = false;
- qWarning (" Nope!..");
+ owarn << " Nope!.." << oendl;
}
@@ -609,4 +607,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
if( element->tagName() != QString::fromLatin1("Contacts") ){
- //qWarning ("OPimContactDefBack::Searching for Tag \"Contacts\"! Found: %s",
- // element->tagName().latin1());
+ //owarn << "OPimContactDefBack::Searching for Tag \"Contacts\"! Found: "
+ // << element->tagName() << oendl;
element = element->nextChild();
@@ -620,4 +618,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
if( element->tagName() != QString::fromLatin1("Contact") ){
- //qWarning ("OPimContactDefBack::Searching for Tag \"Contact\"! Found: %s",
- // element->tagName().latin1());
+ //owarn << "OPimContactDefBack::Searching for Tag \"Contact\"! Found: "
+ // << element->tagName() << oendl;
element = element->nextChild();
@@ -628,4 +626,4 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
*/
- //qWarning("OPimContactDefBack::load element tagName() : %s",
- // element->tagName().latin1() );
+ //owarn << "OPimContactDefBack::load element tagName() : "
+ // << element->tagName() << oendl;
QString dummy;
@@ -638,3 +636,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
for( it = aMap.begin(); it != aMap.end(); ++it ){
- // qWarning ("Read Attribute: %s=%s", it.key().latin1(),it.data().latin1());
+ // owarn << "Read Attribute: " << it.key() << "=" << it.data() << oendl;
@@ -664,3 +662,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
foundAction = true;
- qWarning ("ODefBack(journal)::ACTION found: %d", action);
+ owarn << "ODefBack(journal)::ACTION found: " << action << oendl;
break;
@@ -689,4 +687,3 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
if ( !remove (contact.uid()) )
- qWarning ("ODefBack(journal)::Unable to remove uid: %d",
- contact.uid() );
+ owarn << "ODefBack(journal)::Unable to remove uid: " << contact.uid() << oendl;
break;
@@ -694,7 +691,6 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal
if ( !replace ( contact ) )
- qWarning ("ODefBack(journal)::Unable to replace uid: %d",
- contact.uid() );
+ owarn << "ODefBack(journal)::Unable to replace uid: " << contact.uid() << oendl;
break;
default:
- qWarning ("Unknown action: ignored !");
+ owarn << "Unknown action: ignored !" << oendl;
break;