summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessvcal.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp17
1 files changed, 10 insertions, 7 deletions
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
@@ -23,20 +23,23 @@
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#include <qfile.h>
-
-#include <qtopia/private/vobject_p.h>
-#include <qtopia/timeconversion.h>
-#include <qtopia/private/qfiledirect_p.h>
+/* OPIE */
+#include "vobject_p.h"
+#include <qpe/timeconversion.h>
#include <opie2/otodoaccessvcal.h>
+//FIXME: Hack to allow direct access to FILE* fh. Rewrite this!
+#define protected public
+#include <qfile.h>
+#undef protected
+
using namespace Opie;
namespace {
static OPimTodo eventByVObj( VObject *obj ){
OPimTodo event;
VObject *ob;
@@ -176,25 +179,25 @@ bool OPimTodoAccessVCal::reload() {
return load();
}
bool OPimTodoAccessVCal::save() {
if (!m_dirty )
return true;
- QFileDirect file( m_file );
+ QFile file( m_file );
if (!file.open(IO_WriteOnly ) )
return false;
VObject *obj;
obj = newVObject( VCCalProp );
addPropValue( obj, VCVersionProp, "1.0" );
VObject *vo;
for(QMap<int, OPimTodo>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
vo = vobjByEvent( it.data() );
addVObjectProp(obj, vo );
}
- writeVObject( file.directHandle(), obj );
+ writeVObject( file.fh, obj ); //FIXME: HACK!!!
cleanVObject( obj );
cleanStrTbl();
m_dirty = false;
return true;
}