Diffstat (limited to 'libopie2/opiepim/backend/obackendfactory.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 24 |
1 files changed, 15 insertions, 9 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 @@ -31,30 +31,36 @@ * ToDo: Use plugins * ===================================================================== */ #ifndef OPIE_BACKENDFACTORY_H_ #define OPIE_BACKENDFACTORY_H_ -#include <qstring.h> -#include <qasciidict.h> -#include <qpe/config.h> - +/* OPIE */ #include <opie2/opimaccessbackend.h> #include <opie2/opimglobal.h> #include <opie2/otodoaccessxml.h> #include <opie2/otodoaccessvcal.h> #include <opie2/ocontactaccessbackend_xml.h> #include <opie2/ocontactaccessbackend_vcard.h> #include <opie2/odatebookaccessbackend_xml.h> +#include <opie2/odebug.h> #ifdef __USE_SQL #include <opie2/otodoaccesssql.h> #include <opie2/ocontactaccessbackend_sql.h> #include <opie2/odatebookaccessbackend_sql.h> #endif +#include <qpe/config.h> + +/* QT */ +#include <qstring.h> +#include <qasciidict.h> + + + using namespace Opie; using namespace Opie::Pim; namespace Opie { class OBackendPrivate; @@ -87,13 +93,13 @@ class OBackendFactory * @param appName The name of your application. It will be passed on to the backend. * @param filename Filename of the database file if you don't want to access the default * @see OPimGlobal() */ static T* create( OPimGlobal::PimType type, OPimGlobal::DatabaseStyle database, 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 OPimGlobal::DatabaseStyle use_database = database; if ( use_database == OPimGlobal::DEFAULT ){ use_database = defaultDB( type ); } @@ -105,13 +111,13 @@ class OBackendFactory // Fall through !! case OPimGlobal::SQL: #ifdef __USE_SQL return (T*) new OPimTodoAccessBackendSQL( filename ); break; #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 !! #endif case OPimGlobal::XML: return (T*) new OPimTodoAccessXML( appName, filename ); break; case OPimGlobal::VCARD: @@ -124,13 +130,13 @@ class OBackendFactory // Fall through !! case OPimGlobal::SQL: #ifdef __USE_SQL return (T*) new OPimContactAccessBackend_SQL( appName, filename ); break; #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 !! #endif case OPimGlobal::XML: return (T*) new OPimContactAccessBackend_XML( appName, filename ); break; case OPimGlobal::VCARD: @@ -143,20 +149,20 @@ class OBackendFactory // Fall through !! case OPimGlobal::SQL: #ifdef __USE_SQL return (T*) new ODateBookAccessBackend_SQL( appName, filename ); break; #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 !! #endif case OPimGlobal::XML: return (T*) new ODateBookAccessBackend_XML( appName, filename ); break; case OPimGlobal::VCARD: - qWarning("OBackendFactory:: VCal Backend for DATEBOOK not implemented!"); + owarn << "OBackendFactory:: VCal Backend for DATEBOOK not implemented!" << oendl; return (T*) NULL; break; } default: return (T*) NULL; } |