author | zecke <zecke> | 2003-02-21 16:52:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-21 16:52:49 (UTC) |
commit | 0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7 (patch) (unidiff) | |
tree | f3ce9c9441a1073762f3e0c61cc85f0d5a1fd81d /libopie/pim/orecur.cpp | |
parent | a298235aa1489937e7657079e6352adfc8746acf (diff) | |
download | opie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.zip opie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.tar.gz opie-0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7.tar.bz2 |
-Remove old Todo classes they're deprecated and today I already using the
new API
-Guard against self assignment in OTodo
-Add test apps for OPIM
-Opiefied Event classes
-Added TimeZone handling and pinning of TimeZones to OEvent
-Adjust ORecur and the widget to better timezone behaviour
-rw-r--r-- | libopie/pim/orecur.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/libopie/pim/orecur.cpp b/libopie/pim/orecur.cpp index daf3506..e6a4787 100644 --- a/libopie/pim/orecur.cpp +++ b/libopie/pim/orecur.cpp | |||
@@ -10,17 +10,17 @@ struct ORecur::Data : public QShared { | |||
10 | freq = -1; | 10 | freq = -1; |
11 | days = 0; | 11 | days = 0; |
12 | pos = 0; | 12 | pos = 0; |
13 | create = -1; | 13 | create = QDateTime::currentDateTime(); |
14 | hasEnd = FALSE; | 14 | hasEnd = FALSE; |
15 | end = 0; | 15 | end = QDate::currentDate(); |
16 | } | 16 | } |
17 | char days; // Q_UINT8 for 8 seven days;) | 17 | char days; // Q_UINT8 for 8 seven days;) |
18 | ORecur::RepeatType type; | 18 | ORecur::RepeatType type; |
19 | int freq; | 19 | int freq; |
20 | int pos; | 20 | int pos; |
21 | bool hasEnd : 1; | 21 | bool hasEnd : 1; |
22 | time_t end; | 22 | QDate end; |
23 | time_t create; | 23 | QDateTime create; |
24 | int rep; | 24 | int rep; |
25 | QString app; | 25 | QString app; |
26 | ExceptionList list; | 26 | ExceptionList list; |
@@ -52,6 +52,8 @@ bool ORecur::operator==( const ORecur& )const { | |||
52 | return false; | 52 | return false; |
53 | } | 53 | } |
54 | ORecur &ORecur::operator=( const ORecur& re) { | 54 | ORecur &ORecur::operator=( const ORecur& re) { |
55 | if ( *this == re ) return *this; | ||
56 | |||
55 | re.data->ref(); | 57 | re.data->ref(); |
56 | deref(); | 58 | deref(); |
57 | data = re.data; | 59 | data = re.data; |
@@ -366,15 +368,12 @@ bool ORecur::hasEndDate()const { | |||
366 | return data->hasEnd; | 368 | return data->hasEnd; |
367 | } | 369 | } |
368 | QDate ORecur::endDate()const { | 370 | QDate ORecur::endDate()const { |
369 | return TimeConversion::fromUTC( data->end ).date(); | 371 | return data->end; |
370 | } | 372 | } |
371 | QDate ORecur::start()const{ | 373 | QDate ORecur::start()const{ |
372 | return data->start; | 374 | return data->start; |
373 | } | 375 | } |
374 | time_t ORecur::endDateUTC()const { | 376 | QDateTime ORecur::createdDateTime()const { |
375 | return data->end; | ||
376 | } | ||
377 | time_t ORecur::createTime()const { | ||
378 | return data->create; | 377 | return data->create; |
379 | } | 378 | } |
380 | int ORecur::repetition()const { | 379 | int ORecur::repetition()const { |
@@ -404,13 +403,9 @@ void ORecur::setDays( char c ) { | |||
404 | } | 403 | } |
405 | void ORecur::setEndDate( const QDate& dt) { | 404 | void ORecur::setEndDate( const QDate& dt) { |
406 | checkOrModify(); | 405 | checkOrModify(); |
407 | data->end = TimeConversion::toUTC( dt ); | 406 | data->end = dt; |
408 | } | ||
409 | void ORecur::setEndDateUTC( time_t t) { | ||
410 | checkOrModify(); | ||
411 | data->end = t; | ||
412 | } | 407 | } |
413 | void ORecur::setCreateTime( time_t t) { | 408 | void ORecur::setCreatedDateTime( const QDateTime& t) { |
414 | checkOrModify(); | 409 | checkOrModify(); |
415 | data->create = t; | 410 | data->create = t; |
416 | } | 411 | } |