aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlpropertycache
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-03-10 12:09:00 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-03-14 16:44:35 +0100
commit9de2b11a7033a1969156277bafa848b5c178baa1 (patch)
treee9d349e5165350b50065663e3b9efadd94738cb8 /tests/auto/qml/qqmlpropertycache
parente5246cafffb93f69a49c133210390c253fcb71f2 (diff)
Make most QQmlPropertyData const
You really should not mess with that after creating the property cache. Change-Id: I070200772475bb67f539dbbd85a298020b14ca79 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlpropertycache')
-rw-r--r--tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
index 661b3c6c7b..1c1b42b0d3 100644
--- a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
+++ b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
@@ -189,7 +189,7 @@ Q_SIGNALS:
void signalB();
};
-QQmlPropertyData *cacheProperty(const QQmlPropertyCache::ConstPtr &cache, const char *name)
+const QQmlPropertyData *cacheProperty(const QQmlPropertyCache::ConstPtr &cache, const char *name)
{
return cache->property(QLatin1String(name), nullptr, nullptr);
}
@@ -202,7 +202,7 @@ void tst_qqmlpropertycache::properties()
QQmlPropertyCache::ConstPtr cache(new QQmlPropertyCache(metaObject),
QQmlPropertyCache::ConstPtr::Adopt);
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "propertyA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyA"));
@@ -228,7 +228,7 @@ void tst_qqmlpropertycache::propertiesDerived()
QQmlPropertyCache::ConstPtr::Adopt);
QQmlPropertyCache::ConstPtr cache =
parentCache->copyAndAppend(object.metaObject(), QTypeRevision());
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "propertyA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfProperty("propertyA"));
@@ -256,7 +256,7 @@ void tst_qqmlpropertycache::revisionedProperties()
QQmlPropertyCache::ConstPtr cacheWithVersion(
new QQmlPropertyCache(metaObject, QTypeRevision::fromMinorVersion(1)),
QQmlPropertyCache::ConstPtr::Adopt);
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cacheWithoutVersion, "propertyE")));
QCOMPARE(cacheWithoutVersion->isAllowedInRevision(data), false);
@@ -271,7 +271,7 @@ void tst_qqmlpropertycache::methods()
QQmlPropertyCache::ConstPtr cache(new QQmlPropertyCache(metaObject),
QQmlPropertyCache::ConstPtr::Adopt);
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "slotA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotA()"));
@@ -309,7 +309,7 @@ void tst_qqmlpropertycache::methodsDerived()
QQmlPropertyCache::ConstPtr::Adopt);
QQmlPropertyCache::ConstPtr cache
= parentCache->copyAndAppend(object.metaObject(), QTypeRevision {});
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "slotA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("slotA()"));
@@ -344,7 +344,7 @@ void tst_qqmlpropertycache::signalHandlers()
QQmlPropertyCache::ConstPtr cache(new QQmlPropertyCache(metaObject),
QQmlPropertyCache::ConstPtr::Adopt);
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "onSignalA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()"));
@@ -376,7 +376,7 @@ void tst_qqmlpropertycache::signalHandlersDerived()
QQmlPropertyCache::ConstPtr::Adopt);
QQmlPropertyCache::ConstPtr cache
= parentCache->copyAndAppend(object.metaObject(), QTypeRevision{});
- QQmlPropertyData *data;
+ const QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "onSignalA")));
QCOMPARE(data->coreIndex(), metaObject->indexOfMethod("signalA()"));