-rw-r--r-- | libopie/pim/orecur.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie/pim/orecur.cpp b/libopie/pim/orecur.cpp index 8c9ad46..f46f22e 100644 --- a/libopie/pim/orecur.cpp +++ b/libopie/pim/orecur.cpp | |||
@@ -13,48 +13,56 @@ struct ORecur::Data : public QShared { | |||
13 | freq = -1; | 13 | freq = -1; |
14 | days = 0; | 14 | days = 0; |
15 | pos = 0; | 15 | pos = 0; |
16 | create = QDateTime::currentDateTime(); | 16 | create = QDateTime::currentDateTime(); |
17 | hasEnd = FALSE; | 17 | hasEnd = FALSE; |
18 | end = QDate::currentDate(); | 18 | end = QDate::currentDate(); |
19 | } | 19 | } |
20 | char days; // Q_UINT8 for 8 seven days;) | 20 | char days; // Q_UINT8 for 8 seven days;) |
21 | ORecur::RepeatType type; | 21 | ORecur::RepeatType type; |
22 | int freq; | 22 | int freq; |
23 | int pos; | 23 | int pos; |
24 | bool hasEnd : 1; | 24 | bool hasEnd : 1; |
25 | QDate end; | 25 | QDate end; |
26 | QDateTime create; | 26 | QDateTime create; |
27 | int rep; | 27 | int rep; |
28 | QString app; | 28 | QString app; |
29 | ExceptionList list; | 29 | ExceptionList list; |
30 | QDate start; | 30 | QDate start; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | 33 | ||
34 | ORecur::ORecur() { | 34 | ORecur::ORecur() { |
35 | data = new Data; | 35 | data = new Data; |
36 | } | 36 | } |
37 | |||
38 | ORecur::ORecur( const QMap<int, QString>& map ) | ||
39 | { | ||
40 | ORecur(); | ||
41 | fromMap( map ); | ||
42 | } | ||
43 | |||
44 | |||
37 | ORecur::ORecur( const ORecur& rec) | 45 | ORecur::ORecur( const ORecur& rec) |
38 | : data( rec.data ) | 46 | : data( rec.data ) |
39 | { | 47 | { |
40 | data->ref(); | 48 | data->ref(); |
41 | } | 49 | } |
42 | ORecur::~ORecur() { | 50 | ORecur::~ORecur() { |
43 | if ( data->deref() ) { | 51 | if ( data->deref() ) { |
44 | delete data; | 52 | delete data; |
45 | data = 0l; | 53 | data = 0l; |
46 | } | 54 | } |
47 | } | 55 | } |
48 | void ORecur::deref() { | 56 | void ORecur::deref() { |
49 | if ( data->deref() ) { | 57 | if ( data->deref() ) { |
50 | delete data; | 58 | delete data; |
51 | data = 0l; | 59 | data = 0l; |
52 | } | 60 | } |
53 | } | 61 | } |
54 | bool ORecur::operator==( const ORecur& )const { | 62 | bool ORecur::operator==( const ORecur& )const { |
55 | return false; | 63 | return false; |
56 | } | 64 | } |
57 | ORecur &ORecur::operator=( const ORecur& re) { | 65 | ORecur &ORecur::operator=( const ORecur& re) { |
58 | if ( *this == re ) return *this; | 66 | if ( *this == re ) return *this; |
59 | 67 | ||
60 | re.data->ref(); | 68 | re.data->ref(); |