qt5base-lts/tests/auto
Stephen Kelly 32bc019ac1 Fix automatic declaration of QSharedPointer<T> metatypes.
QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).

In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.

Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.

In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.

Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-12 11:16:45 +02:00
..
cmake Use IF(NOT TARGET ...) before creating imported targets. 2012-05-15 23:03:23 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Remove insignification from QtConcurrentFilter test. 2012-04-19 13:26:51 +02:00
corelib Fix automatic declaration of QSharedPointer<T> metatypes. 2012-06-12 11:16:45 +02:00
dbus Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6 2012-05-02 22:49:26 +02:00
gui Only quit if there are no visible widgets or windows. 2012-06-12 04:30:18 +02:00
guiapplauncher
network Make QIODevice::seek() return false for sequential files. 2012-06-05 13:12:58 +02:00
opengl Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
other Make "other" autotests build without widgets 2012-06-07 07:24:31 +02:00
printsupport QtPrintSupport - Add QPrinterInfo api for more printer details 2012-05-29 23:48:15 +02:00
shared Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00
sql Make sql autotests build without widgets 2012-06-07 07:25:27 +02:00
testlib Use UTF-8 in the QtTest data and benchmark tags 2012-06-09 10:45:01 +02:00
tools Replace QTEST_APPLESS_MAIN with QTEST_MAIN in tests using QProcess 2012-06-05 06:12:20 +02:00
widgets Only quit if there are no visible widgets or windows. 2012-06-12 04:30:18 +02:00
xml Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
auto.pro Don't build printsupport autotests when widgets aren't available 2012-06-07 07:24:01 +02:00
network-settings.h Fix auto tests build with gcc 4.7 2012-05-23 00:42:20 +02:00
platformquirks.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00