diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-08-20 12:55:09 +0200 |
---|---|---|
committer | Stephen Kelly <stephen.kelly@kdab.com> | 2012-08-21 09:15:56 +0200 |
commit | bfbe61ec5344fbfcf6026880f7ee466ab30afbce (patch) | |
tree | e8fbd4f8bfc66ee093140e759fc3f54e434351b5 | |
parent | 495c9f4c8b5300f54aed51ab18e867b8faaf56ae (diff) |
Fix build. QQuickListModel inherits QAbstractItemModel now.
Change-Id: I79502de94325d339be182be391e4298f31c72d1b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r-- | src/models/uiproxyqmlmodel.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/models/uiproxyqmlmodel.cpp b/src/models/uiproxyqmlmodel.cpp index 5ebc358..087f3ca 100644 --- a/src/models/uiproxyqmlmodel.cpp +++ b/src/models/uiproxyqmlmodel.cpp @@ -83,16 +83,12 @@ void UiProxyQmlModel::createFromList(const QVariantList &list) void UiProxyQmlModel::createFromQuickList(QQuickListModel *list) { - QHash<int, QByteArray> roleNames; - - foreach (int role, list->roles()) - roleNames[Qt::UserRole + role] = list->toString(role).toAscii(); - setRoleNames(roleNames); + setRoleNames(list->roleNames()); for (int i = 0; i < list->count(); i++) { QStandardItem *item = new QStandardItem(); - foreach (int role, list->roles()) + foreach (int role, list->roleNames().keys()) item->setData(list->data(i, role), Qt::UserRole + role); item->setFlags(Qt::ItemIsSelectable); appendRow(item); |