author | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
commit | 4ecbf7407c19b59fc136c334f9386c53db453930 (patch) (side-by-side diff) | |
tree | 1cba438e2533f7109af169b0b77988cec6664192 /libopie2/opiepim/otodo.cpp | |
parent | 36375df6ff103e52455823f7afd64c4f4ae7fcb8 (diff) | |
download | opie-4ecbf7407c19b59fc136c334f9386c53db453930.zip opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.gz opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.bz2 |
get in sync with HEAD again
-OPimBase was added to be used as a default struct inside OPimResolver
and to work with DSOs
-TodoListXML backend now uses mmap and madvise to load data
-OContact added/changed rtti
-OTodo added changed rtti
OPimAccess* added stuff necessary for the Resolver and a 'state'/'hint'
on how to load data
OPimResolver which resolves uid + services to Records, rtti to QCOPChannels
loads arbitary Service backends ( will work with DSOs soon )
-OPimMainWindow added some setDocument scripting possibility and
internal marshalling and demarshalling of Records
-OPimRecord added loadDataFromm and saveDataTo for marshalling purposes
much more :)
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index ece624a..cde2b3d 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -1,66 +1,67 @@ #include <qobject.h> #include <qshared.h> #include <qpe/palmtopuidgen.h> #include <qpe/stringutil.h> #include <qpe/palmtoprecord.h> #include <qpe/stringutil.h> #include <qpe/categories.h> #include <qpe/categoryselect.h> #include "opimstate.h" #include "orecur.h" #include "opimmaintainer.h" #include "opimnotifymanager.h" +#include "opimresolver.h" #include "otodo.h" struct OTodo::OTodoData : public QShared { OTodoData() : QShared() { }; QDate date; bool isCompleted:1; bool hasDate:1; int priority; QString desc; QString sum; QMap<QString, QString> extra; ushort prog; OPimState state; ORecur recur; OPimMaintainer maintainer; QDate start; QDate completed; OPimNotifyManager notifiers; }; OTodo::OTodo(const OTodo &event ) : OPimRecord( event ), data( event.data ) { data->ref(); // qWarning("ref up"); } OTodo::~OTodo() { // qWarning("~OTodo " ); if ( data->deref() ) { // qWarning("OTodo::dereffing"); delete data; data = 0l; } } OTodo::OTodo(bool completed, int priority, const QArray<int> &category, const QString& summary, const QString &description, ushort progress, bool hasDate, QDate date, int uid ) : OPimRecord( uid ) { // qWarning("OTodoData " + summary); @@ -372,50 +373,50 @@ QMap<int, QString> OTodo::toMap() const { } QMap<QString, QString> OTodo::toExtraMap()const { return data->extra; } /** * change or modify looks at the ref count and either * creates a new QShared Object or it can modify it * right in place */ void OTodo::changeOrModify() { if ( data->count != 1 ) { qWarning("changeOrModify"); data->deref(); OTodoData* d2 = new OTodoData(); copy(data, d2 ); data = d2; } } // WATCHOUT /* * if you add something to the Data struct * be sure to copy it here */ void OTodo::copy( OTodoData* src, OTodoData* dest ) { dest->date = src->date; dest->isCompleted = src->isCompleted; dest->hasDate = src->hasDate; dest->priority = src->priority; dest->desc = src->desc; dest->sum = src->sum; dest->extra = src->extra; dest->prog = src->prog; dest->state = src->state; dest->recur = src->recur; dest->maintainer = src->maintainer; dest->start = src->start; dest->completed = src->completed; dest->notifiers = src->notifiers; } QString OTodo::type() const { return QString::fromLatin1("OTodo"); } QString OTodo::recordField(int /*id*/ )const { return QString::null; } int OTodo::rtti(){ - return 1; + return OPimResolver::TodoList; } |