Commit bcaac633 authored by David Jarvie's avatar David Jarvie
Browse files

compare() fixes

parent b47a3181
......@@ -3609,8 +3609,7 @@ bool KAEventPrivate::compare(const KAEventPrivate& other, KAEvent::Comparison co
|| mCopyToKOrganizer != other.mCopyToKOrganizer
|| mCompatibility != other.mCompatibility
|| mEnabled != other.mEnabled
|| mReadOnly != other.mReadOnly
|| mRevision != other.mRevision) {
|| mReadOnly != other.mReadOnly) {
return false;
}
if (mRecurrence) {
......@@ -3638,12 +3637,9 @@ bool KAEventPrivate::compare(const KAEventPrivate& other, KAEvent::Comparison co
}
}
if (comparison & KAEvent::Compare::ICalendar) {
if (mCustomProperties != other.mCustomProperties) {
return false;
}
}
if (comparison & KAEvent::Compare::Created) {
if (mCreatedDateTime != other.mCreatedDateTime) {
if (mCreatedDateTime != other.mCreatedDateTime
|| mCustomProperties != other.mCustomProperties
|| mRevision != other.mRevision) {
return false;
}
}
......@@ -3656,8 +3652,8 @@ bool KAEventPrivate::compare(const KAEventPrivate& other, KAEvent::Comparison co
}
if (comparison & KAEvent::Compare::CurrentState) {
if (mNextMainDateTime != other.mNextMainDateTime
|| mNextRepeat != other.mNextRepeat
|| mMainExpired != other.mMainExpired) {
|| mMainExpired != other.mMainExpired
|| (mRepetition && mNextRepeat != other.mNextRepeat)) {
return false;
}
}
......
......@@ -1289,10 +1289,9 @@ public:
/** Data categories for compare(). */
enum class Compare {
Id = 0x01, //!< the event ID
ICalendar = 0x02, //!< extra custom properties for the event in the iCalendar file
Created = 0x04, //!< the event creation timestamp
UserSettable = 0x08, //!< user settable data: resource ID, item ID
CurrentState = 0x10 //!< changeable data which records the current state of the event
ICalendar = 0x02, //!< extra event properties in the iCalendar file: custom properties, revision, creation timestamp
UserSettable = 0x04, //!< user settable data: resource ID, item ID
CurrentState = 0x08 //!< changeable data which records the event's current state: next trigger time etc.
};
Q_DECLARE_FLAGS(Comparison, Compare)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment