author | eilers <eilers> | 2004-07-29 11:03:53 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-07-29 11:03:53 (UTC) |
commit | 46909a5484e330143c4277aa572f833975020de3 (patch) (unidiff) | |
tree | 75485bd191b3df3d8fece407200253ac5d5a25bb /libopie2/opiepim/core | |
parent | 7d9a3eb895dca8e3e05013c602b84bdca1cc28d1 (diff) | |
download | opie-46909a5484e330143c4277aa572f833975020de3.zip opie-46909a5484e330143c4277aa572f833975020de3.tar.gz opie-46909a5484e330143c4277aa572f833975020de3.tar.bz2 |
Fixed screwed indentation.. Don't know where this came from..
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 38 |
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 @@ | |||
42 | #include <opie2/opimglobal.h> | 42 | #include <opie2/opimglobal.h> |
43 | #include <opie2/odebug.h> | 43 | #include <opie2/odebug.h> |
44 | 44 | ||
45 | //#include <qpe/qcopenvelope_qws.h> | 45 | //#include <qpe/qcopenvelope_qws.h> |
46 | #include <qpe/global.h> | 46 | #include <qpe/global.h> |
47 | 47 | ||
48 | /* QT */ | 48 | /* QT */ |
49 | #include <qasciidict.h> | 49 | #include <qasciidict.h> |
50 | #include <qdatetime.h> | 50 | #include <qdatetime.h> |
51 | #include <qfile.h> | 51 | #include <qfile.h> |
52 | #include <qregexp.h> | 52 | #include <qregexp.h> |
53 | #include <qlist.h> | 53 | #include <qlist.h> |
54 | #include <qcopchannel_qws.h> | 54 | #include <qcopchannel_qws.h> |
55 | 55 | ||
56 | /* STD */ | 56 | /* STD */ |
57 | #include <errno.h> | 57 | #include <errno.h> |
58 | #include <fcntl.h> | 58 | #include <fcntl.h> |
59 | #include <unistd.h> | 59 | #include <unistd.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | 61 | ||
62 | 62 | ||
63 | namespace Opie { | 63 | namespace Opie { |
64 | 64 | ||
65 | OPimContactAccess::OPimContactAccess ( const QString appname, const QString , | 65 | OPimContactAccess::OPimContactAccess ( const QString appname, const QString , |
66 | OPimContactAccessBackend* end, bool autosync ): | 66 | OPimContactAccessBackend* end, bool autosync ): |
67 | OPimAccessTemplate<OPimContact>( end ) | 67 | OPimAccessTemplate<OPimContact>( end ) |
68 | { | 68 | { |
69 | /* take care of the backend. If there is no one defined, we | 69 | /* take care of the backend. If there is no one defined, we |
70 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). | 70 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). |
71 | */ | 71 | */ |
72 | if( end == 0 ) { | 72 | if( end == 0 ) { |
73 | owarn << "Using BackendFactory !" << oendl; | 73 | owarn << "Using BackendFactory !" << oendl; |
74 | end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( OPimGlobal::CONTACTLIST, appname ); | 74 | end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( OPimGlobal::CONTACTLIST, appname ); |
75 | } | 75 | } |
76 | // Set backend locally and in template | 76 | // Set backend locally and in template |
77 | m_backEnd = end; | 77 | m_backEnd = end; |
78 | OPimAccessTemplate<OPimContact>::setBackEnd (end); | 78 | OPimAccessTemplate<OPimContact>::setBackEnd (end); |
79 | 79 | ||
80 | 80 | ||
81 | /* Connect signal of external db change to function */ | 81 | /* Connect signal of external db change to function */ |
82 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); | 82 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); |
83 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 83 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
84 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 84 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
85 | if ( autosync ){ | 85 | if ( autosync ){ |
86 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); | 86 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); |
87 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 87 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
88 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 88 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | } | 92 | } |
93 | OPimContactAccess::~OPimContactAccess () | 93 | OPimContactAccess::~OPimContactAccess () |
94 | { | 94 | { |
95 | /* The user may forget to save the changed database, therefore try to | 95 | /* The user may forget to save the changed database, therefore try to |
96 | * do it for him.. | 96 | * do it for him.. |
97 | */ | 97 | */ |
98 | save(); | 98 | save(); |
99 | // delete m_backEnd; is done by template.. | 99 | // delete m_backEnd; is done by template.. |
100 | } | 100 | } |
101 | 101 | ||
102 | 102 | ||
103 | bool OPimContactAccess::save () | 103 | bool OPimContactAccess::save () |
104 | { | 104 | { |
105 | /* If the database was changed externally, we could not save the | 105 | /* If the database was changed externally, we could not save the |
106 | * Data. This will remove added items which is unacceptable ! | 106 | * Data. This will remove added items which is unacceptable ! |
107 | * Therefore: Reload database and merge the data... | 107 | * Therefore: Reload database and merge the data... |
108 | */ | 108 | */ |
109 | if ( OPimAccessTemplate<OPimContact>::wasChangedExternally() ) | 109 | if ( OPimAccessTemplate<OPimContact>::wasChangedExternally() ) |
110 | reload(); | 110 | reload(); |
111 | 111 | ||
112 | bool status = OPimAccessTemplate<OPimContact>::save(); | 112 | bool status = OPimAccessTemplate<OPimContact>::save(); |
113 | if ( !status ) return false; | 113 | if ( !status ) return false; |