author | zautrix <zautrix> | 2004-09-14 01:03:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-14 01:03:08 (UTC) |
commit | 30762fe125216362e1a6c1d5ec5d22d9525aa336 (patch) (unidiff) | |
tree | 4ff0fbf43efa921c86d64ff3f50baa9e59d207d9 /libkcal/alarm.cpp | |
parent | 8ce7eae438dcd20f9c79fc0a36dfef0a6d3931eb (diff) | |
download | kdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.zip kdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.tar.gz kdepimpi-30762fe125216362e1a6c1d5ec5d22d9525aa336.tar.bz2 |
Many bugfixes
-rw-r--r-- | libkcal/alarm.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index 29e6205..1fc7169 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp | |||
@@ -36,48 +36,82 @@ Alarm::Alarm(Incidence *parent) | |||
36 | mMailSubject(""), // to make operator==() not fail | 36 | mMailSubject(""), // to make operator==() not fail |
37 | mAlarmSnoozeTime(5), | 37 | mAlarmSnoozeTime(5), |
38 | mAlarmRepeatCount(0), | 38 | mAlarmRepeatCount(0), |
39 | mEndOffset(false), | 39 | mEndOffset(false), |
40 | mHasTime(false), | 40 | mHasTime(false), |
41 | mAlarmEnabled(false) | 41 | mAlarmEnabled(false) |
42 | { | 42 | { |
43 | 43 | ||
44 | } | 44 | } |
45 | 45 | ||
46 | Alarm::~Alarm() | 46 | Alarm::~Alarm() |
47 | { | 47 | { |
48 | } | 48 | } |
49 | 49 | ||
50 | bool Alarm::operator==( const Alarm& rhs ) const | 50 | bool Alarm::operator==( const Alarm& rhs ) const |
51 | { | 51 | { |
52 | |||
52 | if ( mType != rhs.mType || | 53 | if ( mType != rhs.mType || |
53 | mAlarmSnoozeTime != rhs.mAlarmSnoozeTime || | 54 | mAlarmSnoozeTime != rhs.mAlarmSnoozeTime || |
54 | mAlarmRepeatCount != rhs.mAlarmRepeatCount || | 55 | mAlarmRepeatCount != rhs.mAlarmRepeatCount || |
55 | mAlarmEnabled != rhs.mAlarmEnabled || | 56 | mAlarmEnabled != rhs.mAlarmEnabled || |
56 | mHasTime != rhs.mHasTime) | 57 | mHasTime != rhs.mHasTime) |
57 | return false; | 58 | return false; |
58 | 59 | ||
60 | #if 0 | ||
61 | if ( mType != rhs.mType ) { | ||
62 | |||
63 | qDebug("aaa1 "); | ||
64 | return false; | ||
65 | } | ||
66 | |||
67 | if ( mAlarmSnoozeTime != rhs.mAlarmSnoozeTime ) { | ||
68 | |||
69 | qDebug("aaa2 "); | ||
70 | return false; | ||
71 | } | ||
72 | |||
73 | |||
74 | if ( mAlarmRepeatCount != rhs.mAlarmRepeatCount ) { | ||
75 | |||
76 | qDebug("aaa3 "); | ||
77 | return false; | ||
78 | } | ||
79 | |||
80 | if ( mAlarmEnabled != rhs.mAlarmEnabled ) { | ||
81 | |||
82 | qDebug("aaa4 "); | ||
83 | return false; | ||
84 | } | ||
85 | |||
86 | if ( mHasTime != rhs.mHasTime ) { | ||
87 | |||
88 | qDebug("aaa5 "); | ||
89 | return false; | ||
90 | } | ||
91 | #endif | ||
92 | |||
93 | |||
59 | if (mHasTime) { | 94 | if (mHasTime) { |
60 | if (mAlarmTime != rhs.mAlarmTime) | 95 | if (mAlarmTime != rhs.mAlarmTime) |
61 | return false; | 96 | return false; |
62 | } else { | 97 | } else { |
63 | if (mOffset != rhs.mOffset || | 98 | if (mOffset != rhs.mOffset || |
64 | mEndOffset != rhs.mEndOffset) | 99 | mEndOffset != rhs.mEndOffset) |
65 | return false; | 100 | return false; |
66 | } | 101 | } |
67 | |||
68 | switch (mType) { | 102 | switch (mType) { |
69 | case Display: | 103 | case Display: |
70 | return mDescription == rhs.mDescription; | 104 | return mDescription == rhs.mDescription; |
71 | 105 | ||
72 | case Email: | 106 | case Email: |
73 | return mDescription == rhs.mDescription && | 107 | return mDescription == rhs.mDescription && |
74 | mMailAttachFiles == rhs.mMailAttachFiles && | 108 | mMailAttachFiles == rhs.mMailAttachFiles && |
75 | mMailAddresses == rhs.mMailAddresses && | 109 | mMailAddresses == rhs.mMailAddresses && |
76 | mMailSubject == rhs.mMailSubject; | 110 | mMailSubject == rhs.mMailSubject; |
77 | 111 | ||
78 | case Procedure: | 112 | case Procedure: |
79 | return mFile == rhs.mFile && | 113 | return mFile == rhs.mFile && |
80 | mDescription == rhs.mDescription; | 114 | mDescription == rhs.mDescription; |
81 | 115 | ||
82 | case Audio: | 116 | case Audio: |
83 | return mFile == rhs.mFile; | 117 | return mFile == rhs.mFile; |