From 86a55cdb8cb850066e1dcc288d2dddf600652994 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 4 Aug 2016 12:38:43 +0200 Subject: QML: Make all fields in QQmlPropertyRawData private And add accessors. This makes it easier later on to change the storage of the fields. Change-Id: I21163668ac83a7d52f398981baf3c27ef161c177 Reviewed-by: Simon Hausmann --- .../qqmlpropertycache/tst_qqmlpropertycache.cpp | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'tests/auto/qml/qqmlpropertycache') diff --git a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp index 2916d8455c..824fe445c0 100644 --- a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp +++ b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp @@ -111,16 +111,16 @@ void tst_qqmlpropertycache::properties() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "propertyA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyA")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyA")); QVERIFY((data = cacheProperty(cache, "propertyB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyB")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyB")); QVERIFY((data = cacheProperty(cache, "propertyC"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyC")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyC")); QVERIFY((data = cacheProperty(cache, "propertyD"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyD")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyD")); } void tst_qqmlpropertycache::propertiesDerived() @@ -135,16 +135,16 @@ void tst_qqmlpropertycache::propertiesDerived() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "propertyA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyA")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyA")); QVERIFY((data = cacheProperty(cache, "propertyB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyB")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyB")); QVERIFY((data = cacheProperty(cache, "propertyC"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyC")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyC")); QVERIFY((data = cacheProperty(cache, "propertyD"))); - QCOMPARE(data->coreIndex, metaObject->indexOfProperty("propertyD")); + QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyD")); } void tst_qqmlpropertycache::methods() @@ -158,28 +158,28 @@ void tst_qqmlpropertycache::methods() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "slotA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotA()")); QVERIFY((data = cacheProperty(cache, "slotB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotB()")); QVERIFY((data = cacheProperty(cache, "signalA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()")); QVERIFY((data = cacheProperty(cache, "signalB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalB()")); QVERIFY((data = cacheProperty(cache, "propertyAChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyAChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyAChanged()")); QVERIFY((data = cacheProperty(cache, "propertyBChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyBChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyBChanged()")); QVERIFY((data = cacheProperty(cache, "propertyCChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyCChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyCChanged()")); QVERIFY((data = cacheProperty(cache, "propertyDChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyDChanged()")); } void tst_qqmlpropertycache::methodsDerived() @@ -194,28 +194,28 @@ void tst_qqmlpropertycache::methodsDerived() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "slotA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotA()")); QVERIFY((data = cacheProperty(cache, "slotB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("slotB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotB()")); QVERIFY((data = cacheProperty(cache, "signalA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()")); QVERIFY((data = cacheProperty(cache, "signalB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalB()")); QVERIFY((data = cacheProperty(cache, "propertyAChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyAChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyAChanged()")); QVERIFY((data = cacheProperty(cache, "propertyBChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyBChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyBChanged()")); QVERIFY((data = cacheProperty(cache, "propertyCChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyCChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyCChanged()")); QVERIFY((data = cacheProperty(cache, "propertyDChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyDChanged()")); } void tst_qqmlpropertycache::signalHandlers() @@ -229,22 +229,22 @@ void tst_qqmlpropertycache::signalHandlers() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "onSignalA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()")); QVERIFY((data = cacheProperty(cache, "onSignalB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalB()")); QVERIFY((data = cacheProperty(cache, "onPropertyAChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyAChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyAChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyBChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyBChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyBChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyCChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyCChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyCChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyDChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyDChanged()")); } void tst_qqmlpropertycache::signalHandlersDerived() @@ -259,22 +259,22 @@ void tst_qqmlpropertycache::signalHandlersDerived() QQmlPropertyData *data; QVERIFY((data = cacheProperty(cache, "onSignalA"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalA()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()")); QVERIFY((data = cacheProperty(cache, "onSignalB"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("signalB()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalB()")); QVERIFY((data = cacheProperty(cache, "onPropertyAChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyAChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyAChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyBChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyBChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyBChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyCChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyCChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyCChanged()")); QVERIFY((data = cacheProperty(cache, "onPropertyDChanged"))); - QCOMPARE(data->coreIndex, metaObject->indexOfMethod("propertyDChanged()")); + QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("propertyDChanged()")); } class TestClass : public QObject -- cgit v1.2.3