aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2019-07-18 17:45:05 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2019-07-19 13:38:38 +0200
commit3db15da8e1109ef256a4a1a8a3cd6c643512d5b6 (patch)
treeb5e3014148c3ac5cfd8f7353115167c5d140344b /tests/auto/qml/qqmlecmascript
parent982a397a520b5746dc8682b58bfe81270f75868f (diff)
Fix qqmlecmascript failures for Android
Some silly ignoreMessage failures on 32 bit systems.. QString::number((quint32)0xaabbccdd, 16) returns "0xaabbccdd" while QString::number((qint32)0xaabbccdd, 16) returns "0xffffffffaabbccdd" We therefore change to use quintptr (which will follow the quint32 codepath). Change-Id: I40530d8da83ee43862541f0e87684dc11ed07a53 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index d603ca6907..00105c4225 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2048,7 +2048,7 @@ void tst_qqmlecmascript::functionErrors()
QObject *resource = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- warning = warning.arg(QString::number((qintptr)resource, 16));
+ warning = warning.arg(QString::number((quintptr)resource, 16));
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
delete object;
@@ -4573,7 +4573,7 @@ void tst_qqmlecmascript::scarceResources_other()
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- expectedWarning = expectedWarning.arg(QString::number((qintptr)eo, 16));
+ expectedWarning = expectedWarning.arg(QString::number((quintptr)eo, 16));
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.
@@ -4647,7 +4647,7 @@ void tst_qqmlecmascript::scarceResources_other()
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ScarceResourceObject(0x%1) is not a function");
- expectedWarning = expectedWarning.arg(QString::number((qintptr)eo, 16));
+ expectedWarning = expectedWarning.arg(QString::number((quintptr)eo, 16));
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.