summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
diff options
context:
space:
mode:
authorKevin Wu Won <kevin.wu-won@nokia.com>2010-10-08 15:06:45 +1000
committerKevin Wu Won <kevin.wu-won@nokia.com>2010-10-08 15:06:45 +1000
commit30bdf49bbc5f907ff9942aad85162930b364b39f (patch)
treec3e324aff1eb88b544dbf3dd5d38532d3e955945 /doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
parent9c56b61988b395378caf3293c017439c7cfcc890 (diff)
parent3e257b555c2592252117e9ce3c72a10635ba67b2 (diff)
Merge branch '1.1' into new-rrules
Conflicts: src/organizer/engines/qorganizeritemmemorybackend.cpp src/organizer/engines/qorganizeritemmemorybackend_p.h src/s60installs/eabi/QtOrganizeru.def
Diffstat (limited to 'doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp')
-rw-r--r--doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp b/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
index 8e60641887..39ef15cfc7 100644
--- a/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
+++ b/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
@@ -82,7 +82,7 @@ void snippets()
QOrganizerEvent recEvent;
recEvent.setRecurrenceDates(rDates);
recEvent.setPriority(QOrganizerItemPriority::HighPriority);
- recEvent.setLocationName("Meeting Room 8");
+ recEvent.setLocation("Meeting Room 8");
recEvent.setDescription("A meeting every wednesday to discuss the vitally important topic of marshmallows");
recEvent.setDisplayLabel("Marshmallow Conference");
if (!defaultManager.saveItem(&recEvent))
@@ -93,11 +93,11 @@ void snippets()
QList<QOrganizerItem> instances = defaultManager.itemInstances(recEvent, startDateTime, endDateTime);
//! [Retrieving occurrences of a particular recurrent event within a time period]
qDebug() << "dumping retrieved instances:";
-foreach(const QOrganizerItem& currInst, instances)
-{
- dumpItem(currInst);
- qDebug() << "....................";
-}
+ foreach(const QOrganizerItem& currInst, instances)
+ {
+ dumpItem(currInst);
+ qDebug() << "....................";
+ }
//! [Retrieving the next 5 occurrences of a particular recurrent event]
@@ -126,16 +126,12 @@ foreach(const QOrganizerItem& currInst, instances)
//! [Editing a non-recurrent entry]
//! [Retrieving any entry (not occurrence) which matches a search criteria]
- // XXX TODO: make this more convenient.
- // QOrganizerItemLocation::matchLocationName("Meeting Room 8") ?
- QOrganizerItemDetailFilter locationFilter;
- locationFilter.setDetailDefinitionName(QOrganizerItemLocation::DefinitionName, QOrganizerItemLocation::FieldLocationName);
- locationFilter.setValue("Meeting Room 8");
- QList<QOrganizerItem> entries = defaultManager.items(locationFilter);
+ QList<QOrganizerItem> entries = defaultManager.items(QOrganizerItemLocation::match("Meeting Room 8"));
//! [Retrieving any entry (not occurrence) which matches a search criteria]
//! [Creating an exception to a particular recurrent event]
// the following line should be made simpler via QOIM::itemInstances(item, startDateTime, endDateTime, count)...
+ /* FIXME: correct the example
QOrganizerEventOccurrence nextMarshmallowMeeting = QOrganizerEventOccurrence(defaultManager.itemInstances().value(0)); // should use dfil.
nextMarshmallowMeeting.setStartDateTime(QDateTime::fromString("13.05.2010 18:00:00", "dd.MM.yy hh:mm:ss"));
nextMarshmallowMeeting.setEndDateTime(QDateTime::fromString("13.05.2010 20:00:00", "dd.MM.yy hh:mm:ss"));
@@ -144,6 +140,7 @@ foreach(const QOrganizerItem& currInst, instances)
"to taste the results of the recipe that I will be presenting "\
"at the meeting.");
defaultManager.saveItem(&nextMarshmallowMeeting);
+ */
//! [Creating an exception to a particular recurrent event]
dumpItems(&defaultManager);