summaryrefslogtreecommitdiff
path: root/libopie/pim/orecur.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/orecur.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/orecur.cpp25
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
@@ -12,5 +12,5 @@ struct ORecur::Data : public QShared {
pos = 0;
- create = -1;
+ create = QDateTime::currentDateTime();
hasEnd = FALSE;
- end = 0;
+ end = QDate::currentDate();
}
@@ -21,4 +21,4 @@ struct ORecur::Data : public QShared {
bool hasEnd : 1;
- time_t end;
- time_t create;
+ QDate end;
+ QDateTime create;
int rep;
@@ -54,2 +54,4 @@ bool ORecur::operator==( const ORecur& )const {
ORecur &ORecur::operator=( const ORecur& re) {
+ if ( *this == re ) return *this;
+
re.data->ref();
@@ -368,3 +370,3 @@ bool ORecur::hasEndDate()const {
QDate ORecur::endDate()const {
- return TimeConversion::fromUTC( data->end ).date();
+ return data->end;
}
@@ -373,6 +375,3 @@ QDate ORecur::start()const{
}
-time_t ORecur::endDateUTC()const {
- return data->end;
-}
-time_t ORecur::createTime()const {
+QDateTime ORecur::createdDateTime()const {
return data->create;
@@ -406,9 +405,5 @@ void ORecur::setEndDate( const QDate& dt) {
checkOrModify();
- data->end = TimeConversion::toUTC( dt );
-}
-void ORecur::setEndDateUTC( time_t t) {
- checkOrModify();
- data->end = t;
+ data->end = dt;
}
-void ORecur::setCreateTime( time_t t) {
+void ORecur::setCreatedDateTime( const QDateTime& t) {
checkOrModify();