summaryrefslogtreecommitdiff
path: root/libopie/pim/orecur.cpp
authorzecke <zecke>2003-02-21 16:52:49 (UTC)
committer zecke <zecke>2003-02-21 16:52:49 (UTC)
commit0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7 (patch) (side-by-side diff)
treef3ce9c9441a1073762f3e0c61cc85f0d5a1fd81d /libopie/pim/orecur.cpp
parenta298235aa1489937e7657079e6352adfc8746acf (diff)
downloadopie-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
Diffstat (limited to 'libopie/pim/orecur.cpp') (more/less context) (show 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();