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.

Pick-to: 6.8
Change-Id: I7905de08f15124466f8aa587691b2880c889199f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Peter Varga 2024-11-15 09:21:34 +01:00
parent 2c035073d0
commit 2fc5735f60

View File

@ -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();