Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index 67f267f..417a954 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp | |||
@@ -44,49 +44,49 @@ | |||
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 | 56 | ||
57 | namespace Opie { | 57 | namespace Opie { |
58 | 58 | ||
59 | OPimContactAccess::OPimContactAccess ( const QString appname, const QString , | 59 | OPimContactAccess::OPimContactAccess ( const QString appname, const QString , |
60 | OPimContactAccessBackend* end, bool autosync ): | 60 | OPimContactAccessBackend* end, bool autosync ): |
61 | OPimAccessTemplate<OPimContact>( end ) | 61 | OPimAccessTemplate<OPimContact>( end ) |
62 | { | 62 | { |
63 | /* take care of the backend. If there is no one defined, we | 63 | /* 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..). | 64 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). |
65 | */ | 65 | */ |
66 | if( end == 0 ) { | 66 | if( end == 0 ) { |
67 | qWarning ("Using BackendFactory !"); | 67 | qWarning ("Using BackendFactory !"); |
68 | end = OBackendFactory<OPimContactAccessBackend>::Default( "contact", appname ); | 68 | end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( "contact", appname ); |
69 | } | 69 | } |
70 | // Set backend locally and in template | 70 | // Set backend locally and in template |
71 | m_backEnd = end; | 71 | m_backEnd = end; |
72 | OPimAccessTemplate<OPimContact>::setBackEnd (end); | 72 | OPimAccessTemplate<OPimContact>::setBackEnd (end); |
73 | 73 | ||
74 | 74 | ||
75 | /* Connect signal of external db change to function */ | 75 | /* Connect signal of external db change to function */ |
76 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); | 76 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); |
77 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 77 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
78 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 78 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
79 | if ( autosync ){ | 79 | if ( autosync ){ |
80 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); | 80 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); |
81 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 81 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
82 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 82 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
86 | } | 86 | } |
87 | OPimContactAccess::~OPimContactAccess () | 87 | OPimContactAccess::~OPimContactAccess () |
88 | { | 88 | { |
89 | /* The user may forget to save the changed database, therefore try to | 89 | /* The user may forget to save the changed database, therefore try to |
90 | * do it for him.. | 90 | * do it for him.. |
91 | */ | 91 | */ |
92 | save(); | 92 | save(); |