qt5base-lts/tests/auto/corelib/kernel
Nils Jeisecke fee8944cbe Allow use of template class instances inheriting from a Q_GADGET in Qml
The Q_GADGET macro cannot be used in templates. It can however be useful
to derive a template class from a Q_GADGET enabled base class to benefit
from type safety features in C++ (e.g. the class could represent an id
or handle for some C++ type).

For proper wrapping of a QVariant with a gadget value in a QJSValue, the
QMetaType::IsGadget flag must be set for the registered template
instance type - which does not happen prior to the fix because
IsGadgetHelper requires qt_check_for_QGADGET_macro to be defined in the
registered class but not in an ancestor class - in other words: The
class must declare Q_GADGET.

To overcome this, IsGadgetHelper/IsPointerToGadgetHelper can now
differentiate between a Q_GADGET flagged class (allowing
automatic registration) and a derived class, e.g. a template class
(forcing Q_DECLARE_METATYPE to be used explicitly).

[ChangeLog][QtCore][QMetaObject] It is now possible to use template
class instances inheriting from a Q_GADGET in Qml

Task-number: QTBUG-66744
Change-Id: I7632ad45cff79fa422b3f852ca0b963f35fab155
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-03-10 06:12:24 +00:00
..
qcoreapplication Merge remote-tracking branch 'origin/5.10' into dev 2017-10-17 10:34:24 +02:00
qdeadlinetimer
qelapsedtimer Extend blacklisting of tst_QElapsedTimer::elapsed to cover macOS 10.12 2017-06-18 12:58:58 +00:00
qeventdispatcher Extend blacklisting of qeventdispatcher to cover macOS 2017-05-23 14:52:09 +00:00
qeventloop Remove testQuitLock from BLACKLIST 2017-12-14 21:07:39 +00:00
qmath Be (somewhat more) consistent about the value of pi 2017-06-20 09:53:46 +00:00
qmetaenum
qmetamethod Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qmetaobject Test for leaks in QMetaObject::invoke with functors 2018-01-14 22:36:27 +00:00
qmetaobjectbuilder Add support for scoped enums to QMetaObjectBuilder 2017-04-24 19:19:44 +00:00
qmetaproperty
qmetatype Allow use of template class instances inheriting from a Q_GADGET in Qml 2018-03-10 06:12:24 +00:00
qmimedata
qobject Merge remote-tracking branch 'origin/5.10' into dev 2018-01-02 09:58:44 +01:00
qpointer
qsharedmemory Remove use of QRegExp from QSharedMemory 2017-12-30 23:34:00 +00:00
qsignalblocker
qsignalmapper
qsocketnotifier winrt: Fix tst_QSocketNotifier::asyncMultipleDatagram 2017-05-11 06:37:36 +00:00
qsystemsemaphore Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00
qtimer Merge remote-tracking branch 'origin/5.10' into dev 2017-10-17 10:34:24 +02:00
qtranslator Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qvariant Merge remote-tracking branch 'origin/dev' into 5.11 2018-02-10 15:55:52 +01:00
qwineventnotifier Fix asserts and crashes in QWinEventNotifier activation loop 2018-01-26 06:14:01 +00:00
kernel.pro Exclude QSystemSemaphore test with -no-feature-systemsemaphore 2017-09-18 08:56:53 +00:00