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 /src/imports/organizer/qdeclarativeorganizermodel.cpp | |
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 'src/imports/organizer/qdeclarativeorganizermodel.cpp')
-rw-r--r-- | src/imports/organizer/qdeclarativeorganizermodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/organizer/qdeclarativeorganizermodel.cpp b/src/imports/organizer/qdeclarativeorganizermodel.cpp index fb0ef7081..8432ffa2a 100644 --- a/src/imports/organizer/qdeclarativeorganizermodel.cpp +++ b/src/imports/organizer/qdeclarativeorganizermodel.cpp @@ -1696,13 +1696,13 @@ void QDeclarativeOrganizerModel::removeCollection(const QString &collectionId) } /*! - \qmlmethod Collection OrganizerModel::defaultCollection() - Returns the default Collection object. + \qmlmethod string OrganizerModel::defaultCollectionId() + Returns the id of a default Collection object. */ -QDeclarativeOrganizerCollection* QDeclarativeOrganizerModel::defaultCollection() +QString QDeclarativeOrganizerModel::defaultCollectionId() const { - Q_D(QDeclarativeOrganizerModel); - return collection(d->m_manager->defaultCollection().id().toString()); + Q_D(const QDeclarativeOrganizerModel); + return d->m_manager->defaultCollectionId().toString(); } /*! |