From bfbe61ec5344fbfcf6026880f7ee466ab30afbce Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 20 Aug 2012 12:55:09 +0200 Subject: Fix build. QQuickListModel inherits QAbstractItemModel now. Change-Id: I79502de94325d339be182be391e4298f31c72d1b Reviewed-by: Stephen Kelly --- src/models/uiproxyqmlmodel.cpp | 8 ++------ 1 file 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 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); -- cgit v1.2.3