summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp')
-rw-r--r--doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp b/doc/src/snippets/qtorganizerdocsample/qtorganizerdocsample.cpp
index 60e842dc90..e75c8af9fc 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))
@@ -126,12 +126,7 @@ 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]