From 56602df447c5f16257874f2e97b078dcf76f2467 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 23 Jun 2018 20:08:40 +0200 Subject: Cleanups in the Identifier API Rename from/asHeapObject to from/asStringOrSymbol and fix the signature. Add a isStringOrSymbol() method and redefine isValid() to also include array indices. Change-Id: Ic8272bfbe84d15421e2ebe86ddda7fdaa8db4f3e Reviewed-by: Simon Hausmann --- src/qml/types/qqmllistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/types') diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 8ddacdfd9b..6933f1e432 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1591,7 +1591,7 @@ ReturnedValue ModelObject::get(const Managed *m, Identifier id, const Value *rec const ModelObject *that = static_cast(m); Scope scope(that); - ScopedString name(scope, id.asHeapObject()); + ScopedString name(scope, id.asStringOrSymbol()); const ListLayout::Role *role = that->d()->m_model->m_listModel->getExistingRole(name); if (!role) return QObjectWrapper::get(m, id, receiver, hasProperty); -- cgit v1.2.3