summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp15
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp17
2 files changed, 20 insertions, 12 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index b569f8b..ffa6a7d 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -29,13 +29,18 @@
29/* 29/*
30 * VCard Backend for the OPIE-Contact Database. 30 * VCard Backend for the OPIE-Contact Database.
31 */ 31 */
32#include <opie2/ocontactaccessbackend_vcard.h>
33#include "../../../../library/backend/vobject_p.h"
34#include "../../../../library/backend/qfiledirect_p.h"
35 32
33
34#include "vobject_p.h"
35
36/* OPIE */
37#include <opie2/ocontactaccessbackend_vcard.h>
36#include <qpe/timeconversion.h> 38#include <qpe/timeconversion.h>
37 39
40//FIXME: Hack to allow direct access to FILE* fh. Rewrite this!
41#define protected public
38#include <qfile.h> 42#include <qfile.h>
43#undef protected
39 44
40namespace Opie { 45namespace Opie {
41 46
@@ -94,7 +99,7 @@ bool OPimContactAccessBackend_VCard::save()
94 if (!m_dirty ) 99 if (!m_dirty )
95 return true; 100 return true;
96 101
97 QFileDirect file( m_file ); 102 QFile file( m_file );
98 if (!file.open(IO_WriteOnly ) ) 103 if (!file.open(IO_WriteOnly ) )
99 return false; 104 return false;
100 105
@@ -105,7 +110,7 @@ bool OPimContactAccessBackend_VCard::save()
105 VObject *vo; 110 VObject *vo;
106 for(QMap<int, OPimContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ 111 for(QMap<int, OPimContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
107 vo = createVObject( *it ); 112 vo = createVObject( *it );
108 writeVObject( file.directHandle() , vo ); 113 writeVObject( file.fh, vo ); //FIXME: HACK!!!
109 cleanVObject( vo ); 114 cleanVObject( vo );
110 } 115 }
111 cleanStrTbl(); 116 cleanStrTbl();
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index 0a1baf9..03d4479 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -26,14 +26,17 @@
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29#include <qfile.h>
30
31#include <qtopia/private/vobject_p.h>
32#include <qtopia/timeconversion.h>
33#include <qtopia/private/qfiledirect_p.h>
34 29
30/* OPIE */
31#include "vobject_p.h"
32#include <qpe/timeconversion.h>
35#include <opie2/otodoaccessvcal.h> 33#include <opie2/otodoaccessvcal.h>
36 34
35//FIXME: Hack to allow direct access to FILE* fh. Rewrite this!
36#define protected public
37#include <qfile.h>
38#undef protected
39
37using namespace Opie; 40using namespace Opie;
38 41
39namespace { 42namespace {
@@ -179,7 +182,7 @@ bool OPimTodoAccessVCal::save() {
179 if (!m_dirty ) 182 if (!m_dirty )
180 return true; 183 return true;
181 184
182 QFileDirect file( m_file ); 185 QFile file( m_file );
183 if (!file.open(IO_WriteOnly ) ) 186 if (!file.open(IO_WriteOnly ) )
184 return false; 187 return false;
185 188
@@ -191,7 +194,7 @@ bool OPimTodoAccessVCal::save() {
191 vo = vobjByEvent( it.data() ); 194 vo = vobjByEvent( it.data() );
192 addVObjectProp(obj, vo ); 195 addVObjectProp(obj, vo );
193 } 196 }
194 writeVObject( file.directHandle(), obj ); 197 writeVObject( file.fh, obj ); //FIXME: HACK!!!
195 cleanVObject( obj ); 198 cleanVObject( obj );
196 cleanStrTbl(); 199 cleanStrTbl();
197 200