-rw-r--r-- | libopie/pim/orecur.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie/pim/orecur.cpp b/libopie/pim/orecur.cpp index 6c81f8f..257d4fd 100644 --- a/libopie/pim/orecur.cpp +++ b/libopie/pim/orecur.cpp | |||
@@ -21,6 +21,7 @@ struct ORecur::Data : public QShared { | |||
21 | bool hasEnd : 1; | 21 | bool hasEnd : 1; |
22 | time_t end; | 22 | time_t end; |
23 | time_t create; | 23 | time_t create; |
24 | int rep; | ||
24 | }; | 25 | }; |
25 | 26 | ||
26 | 27 | ||
@@ -78,6 +79,9 @@ time_t ORecur::endDateUTC()const { | |||
78 | time_t ORecur::createTime()const { | 79 | time_t ORecur::createTime()const { |
79 | return data->create; | 80 | return data->create; |
80 | } | 81 | } |
82 | int ORecur::repetition()const { | ||
83 | return data->rep; | ||
84 | } | ||
81 | void ORecur::setType( const RepeatType& z) { | 85 | void ORecur::setType( const RepeatType& z) { |
82 | checkOrModify(); | 86 | checkOrModify(); |
83 | data->type = z; | 87 | data->type = z; |
@@ -110,6 +114,10 @@ void ORecur::setHasEndDate( bool b) { | |||
110 | checkOrModify(); | 114 | checkOrModify(); |
111 | data->hasEnd = b; | 115 | data->hasEnd = b; |
112 | } | 116 | } |
117 | void ORecur::setRepitition( int rep ) { | ||
118 | checkOrModify(); | ||
119 | data->rep = rep; | ||
120 | } | ||
113 | void ORecur::checkOrModify() { | 121 | void ORecur::checkOrModify() { |
114 | if ( data->count != 1 ) { | 122 | if ( data->count != 1 ) { |
115 | data->deref(); | 123 | data->deref(); |
@@ -121,6 +129,7 @@ void ORecur::checkOrModify() { | |||
121 | d2->hasEnd = data->hasEnd; | 129 | d2->hasEnd = data->hasEnd; |
122 | d2->end = data->end; | 130 | d2->end = data->end; |
123 | d2->create = data->create; | 131 | d2->create = data->create; |
132 | d2->rep = data->rep; | ||
124 | data = d2; | 133 | data = d2; |
125 | } | 134 | } |
126 | } | 135 | } |