qproperty_p.h: fix -Wshadow in notify()
Clang warning:
.../qproperty_p.h:666:58: warning: declaration shadows a local variable [-Wshadow]
666 | if (QPropertyObserverPointer observer = d.firstObserver())
| ^
.../qproperty_p.h:660:46: note: previous declaration is here
660 | if (QPropertyObserverPointer observer = d.firstObserver()) {
|
Fix by abbreviating the variable name in if statement.
Change-Id: I7905de08f15124466f8aa587691b2880c889199f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 2fc5735f60e0bcd7b7b451a32fd999f2d36a33c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
parent
9c726ed287
commit
f3aabe7ed5
|
|
@ -663,8 +663,8 @@ public:
|
|||
if (bd->notifyObserver_helper(this, storage, observer, bindingObservers)
|
||||
== QtPrivate::QPropertyBindingData::Evaluated) {
|
||||
// evaluateBindings() can trash the observers. We need to re-fetch here.
|
||||
if (QPropertyObserverPointer observer = d.firstObserver())
|
||||
observer.notify(this);
|
||||
if (QPropertyObserverPointer obs = d.firstObserver())
|
||||
obs.notify(this);
|
||||
for (auto&& bindingPtr: bindingObservers) {
|
||||
auto *binding = static_cast<QPropertyBindingPrivate *>(bindingPtr.get());
|
||||
binding->notifyNonRecursive();
|
||||
|
|
|
|||
Loading…
Reference in New Issue