diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-02-12 14:06:18 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-02-12 14:32:23 +0000 |
commit | 18e3d741c3526978cdacc88bc260d250918d2080 (patch) | |
tree | 751d4f540543795944bc984bf2d6004c7c17e7d6 /examples | |
parent | 86db658eace4dc84c1d3185c71f2282278b3a452 (diff) |
Replace defaultCollection() with defaultCollectionId()
This assumes the id of a default collection is known at the engine
initialization time, but makes it possible to defer fetching
the default collection's content up until it is needed.
This also greatly simplifies the initialization process for the
async-only engines.
Change-Id: I5116ffdd22d7fa6cc5f8a8eed7f94518e6db7089
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/organizer/calendardemo/src/calendardemo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/organizer/calendardemo/src/calendardemo.cpp b/examples/organizer/calendardemo/src/calendardemo.cpp index ca0f4b086..c32317a40 100644 --- a/examples/organizer/calendardemo/src/calendardemo.cpp +++ b/examples/organizer/calendardemo/src/calendardemo.cpp @@ -312,7 +312,7 @@ void CalendarDemo::addEvents() QList<QOrganizerItem> items; // Create a large number of events asynchronously - QOrganizerCollectionId defaultCollectionId = m_manager->defaultCollection().id(); + QOrganizerCollectionId defaultCollectionId = m_manager->defaultCollectionId(); for(int index=0 ; index < 100 ; index++) { QOrganizerItem item; item.setType(QOrganizerItemType::TypeEvent); @@ -494,7 +494,7 @@ void CalendarDemo::deleteAllEntries() void CalendarDemo::addCalendar() { // Get default collection - QOrganizerCollection defaultCollection = m_manager->defaultCollection(); + QOrganizerCollection defaultCollection = m_manager->collection(m_manager->defaultCollectionId()); QOrganizerCollection newCollection = defaultCollection; newCollection.setId(QOrganizerCollectionId()); // reset collection id |