diff options
author | Marco Bubke <marco.bubke@digia.com> | 2012-10-23 16:46:11 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-23 17:23:51 +0200 |
commit | 099111a9fbaf31e954ca91a18d47272590f60ea1 (patch) | |
tree | 88c9f8b5eba9269cf6035449d05bc17b26fc5bc0 /src/imports/organizer/qdeclarativeorganizermodel.cpp | |
parent | 7804109c0d33ffddb3b6c8109864339e1e315bab (diff) |
Fix the qml list interface
The qml list interface was changed, so that there is now a read only
constructor and the default properties are removed. This is because the
original interface was very runtime centric, like other parts in qml.
The new interface was changed for the needs of the qml designer and
debugger.
Task-number: QTBUG-9390
Change-Id: I52e9e946e4986107677a130f4e46e820f000b55e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/imports/organizer/qdeclarativeorganizermodel.cpp')
-rw-r--r-- | src/imports/organizer/qdeclarativeorganizermodel.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/imports/organizer/qdeclarativeorganizermodel.cpp b/src/imports/organizer/qdeclarativeorganizermodel.cpp index 6b9fb561b..6023e3ac0 100644 --- a/src/imports/organizer/qdeclarativeorganizermodel.cpp +++ b/src/imports/organizer/qdeclarativeorganizermodel.cpp @@ -1720,7 +1720,7 @@ QVariant QDeclarativeOrganizerModel::data(const QModelIndex &index, int role) co */ QQmlListProperty<QDeclarativeOrganizerItem> QDeclarativeOrganizerModel::items() { - return QQmlListProperty<QDeclarativeOrganizerItem>(this, 0, item_append, item_count, item_at); + return QQmlListProperty<QDeclarativeOrganizerItem>(this, 0, item_count, item_at); } /*! @@ -1732,14 +1732,7 @@ QQmlListProperty<QDeclarativeOrganizerItem> QDeclarativeOrganizerModel::items() */ QQmlListProperty<QDeclarativeOrganizerCollection> QDeclarativeOrganizerModel::collections() { - return QQmlListProperty<QDeclarativeOrganizerCollection>(this, 0, collection_append, collection_count, collection_at); -} - -void QDeclarativeOrganizerModel::item_append(QQmlListProperty<QDeclarativeOrganizerItem> *p, QDeclarativeOrganizerItem *item) -{ - Q_UNUSED(p); - Q_UNUSED(item); - qmlInfo(0) << tr("OrganizerModel: appending items is not currently supported"); + return QQmlListProperty<QDeclarativeOrganizerCollection>(this, 0, collection_count, collection_at); } int QDeclarativeOrganizerModel::item_count(QQmlListProperty<QDeclarativeOrganizerItem> *p) @@ -1805,13 +1798,6 @@ void QDeclarativeOrganizerModel::sortOrder_clear(QQmlListProperty<QDeclarativeO } } -void QDeclarativeOrganizerModel::collection_append(QQmlListProperty<QDeclarativeOrganizerCollection> *p, QDeclarativeOrganizerCollection *collection) -{ - Q_UNUSED(p); - Q_UNUSED(collection); - qmlInfo(0) << tr("OrganizerModel: appending collections is not currently supported"); -} - int QDeclarativeOrganizerModel::collection_count(QQmlListProperty<QDeclarativeOrganizerCollection> *p) { QDeclarativeOrganizerModel* model = qobject_cast<QDeclarativeOrganizerModel*>(p->object); |