summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 417a954..a372267 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -44,37 +44,38 @@
44#include <qcopchannel_qws.h> 44#include <qcopchannel_qws.h>
45 45
46//#include <qpe/qcopenvelope_qws.h> 46//#include <qpe/qcopenvelope_qws.h>
47#include <qpe/global.h> 47#include <qpe/global.h>
48 48
49#include <errno.h> 49#include <errno.h>
50#include <fcntl.h> 50#include <fcntl.h>
51#include <unistd.h> 51#include <unistd.h>
52#include <stdlib.h> 52#include <stdlib.h>
53 53
54#include <opie2/ocontactaccessbackend_xml.h> 54#include <opie2/ocontactaccessbackend_xml.h>
55#include <opie2/opimresolver.h> 55#include <opie2/opimresolver.h>
56#include <opie2/opimglobal.h>
56 57
57namespace Opie { 58namespace Opie {
58 59
59OPimContactAccess::OPimContactAccess ( const QString appname, const QString , 60OPimContactAccess::OPimContactAccess ( const QString appname, const QString ,
60 OPimContactAccessBackend* end, bool autosync ): 61 OPimContactAccessBackend* end, bool autosync ):
61 OPimAccessTemplate<OPimContact>( end ) 62 OPimAccessTemplate<OPimContact>( end )
62{ 63{
63 /* take care of the backend. If there is no one defined, we 64 /* take care of the backend. If there is no one defined, we
64 * will use the XML-Backend as default (until we have a cute SQL-Backend..). 65 * will use the XML-Backend as default (until we have a cute SQL-Backend..).
65 */ 66 */
66 if( end == 0 ) { 67 if( end == 0 ) {
67 qWarning ("Using BackendFactory !"); 68 qWarning ("Using BackendFactory !");
68 end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( "contact", appname ); 69 end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( OPimGlobal::CONTACTLIST, appname );
69 } 70 }
70 // Set backend locally and in template 71 // Set backend locally and in template
71 m_backEnd = end; 72 m_backEnd = end;
72 OPimAccessTemplate<OPimContact>::setBackEnd (end); 73 OPimAccessTemplate<OPimContact>::setBackEnd (end);
73 74
74 75
75 /* Connect signal of external db change to function */ 76 /* Connect signal of external db change to function */
76 QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); 77 QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
77 connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), 78 connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)),
78 this, SLOT(copMessage(const QCString&,const QByteArray&)) ); 79 this, SLOT(copMessage(const QCString&,const QByteArray&)) );
79 if ( autosync ){ 80 if ( autosync ){
80 QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); 81 QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this );