From 36bd34dbdcaa0fcfd47d1edb3494a4babb709ca3 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 25 May 2020 12:53:53 +0200 Subject: [PATCH] QProperty: Apply coding style and avoid warnings Change-Id: I14efdb293a4be39b3849b34bd8013fdab016ce7e Reviewed-by: Simon Hausmann --- src/corelib/kernel/qproperty.cpp | 2 +- tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index e249dcfb44..7554e91aba 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -319,7 +319,7 @@ void QPropertyObserverPointer::setBindingToMarkDirty(QPropertyBindingPrivate *bi void QPropertyObserverPointer::notify(QPropertyBindingPrivate *triggeringBinding, void *propertyDataPtr) { bool knownIfPropertyChanged = false; - bool propertyChanged =true; + bool propertyChanged = true; auto observer = const_cast(ptr); while (observer) { diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp index 8894260988..2cfcc8e22f 100644 --- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp +++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp @@ -222,11 +222,11 @@ void tst_QProperty::avoidDependencyAllocationAfterFirstEval() QCOMPARE(propWithBinding.value(), int(11)); QVERIFY(QPropertyBasePointer::get(propWithBinding).bindingPtr()); - QCOMPARE(QPropertyBasePointer::get(propWithBinding).bindingPtr()->dependencyObserverCount, 2); + QCOMPARE(QPropertyBasePointer::get(propWithBinding).bindingPtr()->dependencyObserverCount, 2u); firstDependency = 100; QCOMPARE(propWithBinding.value(), int(110)); - QCOMPARE(QPropertyBasePointer::get(propWithBinding).bindingPtr()->dependencyObserverCount, 2); + QCOMPARE(QPropertyBasePointer::get(propWithBinding).bindingPtr()->dependencyObserverCount, 2u); } void tst_QProperty::propertyArrays()