Avoid superfluous QBindingStoragePrivate::get call
If we have no currentBinding, then registerWithCurrentlyEvaluatingBinding will not do anything. Thus we can completely avoid fetching the storage. Pick-to: 6.2 Change-Id: Ic20142e4c4e09752b5c41b959f66080e6885e6c3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
71fea09e1a
commit
b8e1782b67
|
|
@ -2202,7 +2202,9 @@ void QBindingStorage::registerDependency_helper(const QUntypedPropertyData *data
|
|||
else
|
||||
currentBinding = QT_PREPEND_NAMESPACE(bindingStatus).currentlyEvaluatingBinding;
|
||||
QUntypedPropertyData *dd = const_cast<QUntypedPropertyData *>(data);
|
||||
auto storage = QBindingStoragePrivate(d).get(dd, /*create=*/ currentBinding != nullptr);
|
||||
if (!currentBinding)
|
||||
return;
|
||||
auto storage = QBindingStoragePrivate(d).get(dd, true);
|
||||
if (!storage)
|
||||
return;
|
||||
storage->registerWithCurrentlyEvaluatingBinding(currentBinding);
|
||||
|
|
|
|||
Loading…
Reference in New Issue