qt5base-lts/tests/auto/corelib/kernel/qobject
Rohan McGovern adfca27ac0 Fixed tst_qobject::property for clang
The test was failing at:

  QCOMPARE(property.userType(), qMetaTypeId<CustomType*>());

The CustomType* metatype was not registered before this part of the
test.

qMetaTypeId<T> will register the metatype for T before returning it if
it is not yet registered, while QMetaProperty::userType() returns 0 if
the metatype is not yet registered.  However, the order of evaluation of
these two expressions in the above statement is technically undefined.

Apparently, gcc evaluates the arguments in order from right to left,
allowing the test to pass, while clang evaluates the arguments in order
from left to right, causing the test to fail.

Change-Id: I5059556e860cec29b57c31e4e26f46cf9e6055da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-02-09 10:45:38 +01:00
..
signalbug Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
.gitignore QObject-test: Reorganize subprocess. 2011-12-14 07:07:09 +01:00
moc_oldnormalizeobject.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
oldnormalizeobject.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qobject.pro QObject-test: Reorganize subprocess. 2011-12-14 07:07:09 +01:00
tst_qobject.cpp Fixed tst_qobject::property for clang 2012-02-09 10:45:38 +01:00
tst_qobject.pro tst_qobject: Run as console application. 2012-01-25 02:24:29 +01:00