diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-23 11:15:52 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-27 08:33:52 +0000 |
commit | 1804fea8893c355dbd585e373cb9644387410a92 (patch) | |
tree | a1e0a43a74f9137b7bc1c9da0332e6c2e3984cde /src/qml/jsruntime/qv4qmlcontext.cpp | |
parent | 7fb4fc2ac7b56d3f60ceb8ae1175bd4596436cc7 (diff) |
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 <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qmlcontext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<QQmlContextWrapper> 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. |