diff options
| author | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-06-07 11:45:11 +1000 |
|---|---|---|
| committer | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-06-07 11:50:54 +1000 |
| commit | 620c14c1341285615088fabce970c03b35eee0a3 (patch) | |
| tree | 50f8db793745777efc6614aef5d289e7d666b04d /doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp | |
| parent | ef27b3a8c22fd3ee5c28b6e37ae8329ef9a53df7 (diff) | |
Change QOIRecurrence::{recurrence,exception}Dates to QDate
To include the time would be inconsistent with the recurrence rules,
which only specify up to a day level.
Setting a recurrence date to a specific date/time would still be
possible using an exception.
Diffstat (limited to 'doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp')
| -rw-r--r-- | doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp b/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp index 55716f374f..21e9aac09b 100644 --- a/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp +++ b/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp @@ -71,11 +71,11 @@ void snippets() // XXX TODO: use rrule instead of rdates. QDateTime startDateTime = QDateTime::currentDateTime(); - QDateTime firstOccDate = startDateTime.addDays(7); - QDateTime secondOccDate = startDateTime.addDays(14); - QDateTime thirdOccDate = startDateTime.addDays(21); + QDate firstOccDate = startDateTime.date().addDays(7); + QDate secondOccDate = startDateTime.date().addDays(14); + QDate thirdOccDate = startDateTime.date().addDays(21); QDateTime endDateTime = startDateTime.addDays(28); - QList<QDateTime> rDates; + QList<QDate> rDates; rDates << firstOccDate << secondOccDate << thirdOccDate; //! [Creating a recurrent event] |
