qt6-bb10/tests/auto
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
..
android
bic/data Add binary compatibility files for QtBase for 5.10 2018-01-04 16:26:32 +00:00
cmake CMake: Set SKIP_AUTOMOC/AUTOUIC where needed 2017-11-22 13:51:30 +00:00
compilerwarnings/data
concurrent Fix of flaky qFutureAssignmentLeak test 2018-02-15 16:24:38 +00:00
corelib Allow use of template class instances inheriting from a Q_GADGET in Qml 2018-03-10 06:12:24 +00:00
dbus Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
gui QStandardItem: add more sanity checks on insertRow(s)/Column(s) 2018-03-07 18:36:15 +00:00
guiapplauncher
installed_cmake
network tst_QLocalSocket: Fix not showing error output in processConnection 2018-03-01 09:37:58 +00:00
opengl Remove tst_QGLThreads::textureUploadInThread 2018-03-02 07:20:32 +00:00
other set attribute specifier before namespace name 2018-03-09 05:23:26 +00:00
printsupport Convert features.completer to QT_[REQUIRE_]CONFIG 2017-09-04 11:28:02 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql SQL/Postgres: Fix support for nan, inf and -inf 2018-03-07 18:35:57 +00:00
testlib QTestlib/selftests: Fix failures due to logging system output 2018-03-02 08:16:21 +00:00
tools uic: Add the include for QIcon conditionally 2018-03-06 06:49:00 +00:00
widgets Fix QLabel crash if buddy's lifetime is too short 2018-03-08 22:36:49 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro tests/auto/auto.pro: Use correct null device for DBUS check 2017-12-01 09:53:07 +00:00
network-settings.h