diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-12 17:44:04 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-13 11:18:57 +0200 |
commit | 122d0367fd96526b3573a3188286153c846680ca (patch) | |
tree | 2feb36d8a6cc72ec2e77dd1ac88f78d4c2e69c96 | |
parent | 3df387d63421f09533ab72e2a73fb5d259693120 (diff) |
Use the correct type's meta-type ID for int and save a misplaced cast
I got compiler warnings because of a comparison of a QVariant::type()
with an int(). These were caused by a "fix" that cast to int a
QMetaType::Int, where the correct fix was surely to use QVariant::Int.
This amends commit 83f8d886cee0a40ac1ad5e43e597f309f602ad76.
Change-Id: I3f1718e4f2c0c5a6a1cbb79266768fba4e3290e3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp index cf0f3c7bb3..07af519a3d 100644 --- a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp +++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp @@ -470,7 +470,7 @@ void tst_qqmlconnections::noAcceleratedGlobalLookup() QVERIFY(c.isReady()); QScopedPointer<QObject> object(c.create()); const QVariant val = object->property("testEnum"); - QCOMPARE(val.type(), int(QMetaType::Int)); + QCOMPARE(val.type(), QVariant::Int); QCOMPARE(val.toInt(), int(Proxy::EnumValue)); } |