From 1804fea8893c355dbd585e373cb9644387410a92 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 23 Sep 2018 11:15:52 +0200 Subject: Refactor InternalClass::find() Specialize find() into several methods for different purposes. Prepares for further cleanups and being able to split up getter and setter for accessor properties. Change-Id: Id4ec5509ac1a1361e2170bbfc2347b89b520c782 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4qmlcontext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp') diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp index b69081d378..b10065d308 100644 --- a/src/qml/jsruntime/qv4qmlcontext.cpp +++ b/src/qml/jsruntime/qv4qmlcontext.cpp @@ -265,9 +265,9 @@ bool QQmlContextWrapper::virtualPut(Managed *m, PropertyKey id, const Value &val return false; QV4::Scoped wrapper(scope, resource); - uint member = wrapper->internalClass()->find(id); - if (member < UINT_MAX) - return wrapper->putValue(member, value); + auto member = wrapper->internalClass()->find(id); + if (member.index < UINT_MAX) + return wrapper->putValue(member.index, value); // It's possible we could delay the calculation of the "actual" context (in the case // of sub contexts) until it is definitely needed. -- cgit v1.2.3