From ae70312b1613e26b4ef89a2c9821d9531b82e987 Mon Sep 17 00:00:00 2001 From: eilers Date: Mon, 22 Dec 2003 10:19:25 +0000 Subject: Finishing implementation of sql-backend for datebook. But I have to port the PIM datebook application to use it, before I could debug the whole stuff. Thus, PIM-Database backend is finished, but highly experimental. And some parts are still generic. For instance, the "queryByExample()" methods are not (or not fully) implemented. Todo: custom-entries not stored. The big show stopper: matchRegExp() (needed by OpieSearch) needs regular expression search in the database, which is not supported by sqlite ! Therefore we need either an extended sqlite or a workaround which would be very slow and memory consuming.. --- (limited to 'libopie/pim/oevent.cpp') diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index ec05e77..9b31957 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp @@ -77,6 +77,15 @@ OEvent::OEvent( const OEvent& ev) { data->ref(); } + +OEvent::OEvent( const QMap map ) + : OPimRecord( 0 ) +{ + data = new Data; + + fromMap( map ); +} + OEvent::~OEvent() { if ( data->deref() ) { delete data; @@ -403,6 +412,10 @@ QMap OEvent::toMap()const { retMap.insert( OEvent::FREndDate, recFields[ORecur::EndDate] ); retMap.insert( OEvent::FRCreated, recFields[ORecur::Created] ); retMap.insert( OEvent::FRExceptions, recFields[ORecur::Exceptions] ); + } else { + ORecur recur = recurrence(); + QMap recFields = recur.toMap(); + retMap.insert( OEvent::FRType, recFields[ORecur::RType] ); } return retMap; -- cgit v0.9.0.2