diff --git a/src/declarativeimports/calendar/eventdatadecorator.h b/src/declarativeimports/calendar/eventdatadecorator.h --- a/src/declarativeimports/calendar/eventdatadecorator.h +++ b/src/declarativeimports/calendar/eventdatadecorator.h @@ -32,6 +32,7 @@ Q_PROPERTY(QDateTime startDateTime READ startDateTime NOTIFY eventDataChanged) Q_PROPERTY(QDateTime endDateTime READ endDateTime NOTIFY eventDataChanged) Q_PROPERTY(bool isAllDay READ isAllDay NOTIFY eventDataChanged) + Q_PROPERTY(bool hasEndDateTime READ hasEndDateTime NOTIFY eventDataChanged) Q_PROPERTY(bool isMinor READ isMinor NOTIFY eventDataChanged) Q_PROPERTY(QString title READ title NOTIFY eventDataChanged) Q_PROPERTY(QString description READ description NOTIFY eventDataChanged) @@ -44,6 +45,7 @@ QDateTime startDateTime() const; QDateTime endDateTime() const; bool isAllDay() const; + bool hasEndDateTime() const; bool isMinor() const; QString title() const; QString description() const; diff --git a/src/declarativeimports/calendar/eventdatadecorator.cpp b/src/declarativeimports/calendar/eventdatadecorator.cpp --- a/src/declarativeimports/calendar/eventdatadecorator.cpp +++ b/src/declarativeimports/calendar/eventdatadecorator.cpp @@ -42,6 +42,11 @@ return m_data.isAllDay(); } +bool EventDataDecorator::hasEndDateTime() const +{ + return m_data.endDateTime().isValid(); +} + bool EventDataDecorator::isMinor() const { return m_data.isMinor();