summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 7a3d7cb..2602493 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -42,72 +42,72 @@
#include <opie2/opimglobal.h>
#include <opie2/odebug.h>
//#include <qpe/qcopenvelope_qws.h>
#include <qpe/global.h>
/* QT */
#include <qasciidict.h>
#include <qdatetime.h>
#include <qfile.h>
#include <qregexp.h>
#include <qlist.h>
#include <qcopchannel_qws.h>
/* STD */
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
namespace Opie {
OPimContactAccess::OPimContactAccess ( const QString appname, const QString ,
- OPimContactAccessBackend* end, bool autosync ):
- OPimAccessTemplate<OPimContact>( end )
+ OPimContactAccessBackend* end, bool autosync ):
+ OPimAccessTemplate<OPimContact>( end )
{
/* take care of the backend. If there is no one defined, we
- * will use the XML-Backend as default (until we have a cute SQL-Backend..).
- */
+ * will use the XML-Backend as default (until we have a cute SQL-Backend..).
+ */
if( end == 0 ) {
- owarn << "Using BackendFactory !" << oendl;
- end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( OPimGlobal::CONTACTLIST, appname );
+ owarn << "Using BackendFactory !" << oendl;
+ end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( OPimGlobal::CONTACTLIST, appname );
}
- // Set backend locally and in template
+ // Set backend locally and in template
m_backEnd = end;
- OPimAccessTemplate<OPimContact>::setBackEnd (end);
-
-
- /* Connect signal of external db change to function */
- QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
- connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)),
- this, SLOT(copMessage(const QCString&,const QByteArray&)) );
- if ( autosync ){
- QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this );
- connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)),
- this, SLOT(copMessage(const QCString&,const QByteArray&)) );
- }
+ OPimAccessTemplate<OPimContact>::setBackEnd (end);
+
+
+ /* Connect signal of external db change to function */
+ QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
+ connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(copMessage(const QCString&,const QByteArray&)) );
+ if ( autosync ){
+ QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this );
+ connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(copMessage(const QCString&,const QByteArray&)) );
+ }
}
OPimContactAccess::~OPimContactAccess ()
{
/* The user may forget to save the changed database, therefore try to
* do it for him..
*/
save();
// delete m_backEnd; is done by template..
}
bool OPimContactAccess::save ()
{
/* If the database was changed externally, we could not save the
* Data. This will remove added items which is unacceptable !
* Therefore: Reload database and merge the data...
*/
if ( OPimAccessTemplate<OPimContact>::wasChangedExternally() )
reload();
bool status = OPimAccessTemplate<OPimContact>::save();
if ( !status ) return false;