qt6-bb10/tests/auto/corelib
Phil Thompson d61a15d043 Fix QFlag properties built by QMetaObjectBuilder
When Q_PROPERTY is used to define a property with type (for example)
Qt::Alignment the name of the type stored in the meta-object is
"Qt::Alignment".

When QMetaObjectBuilder.addProperty() is used it will instead use the
name of the meta-type (ie. "QFlags<Qt::AlignmentFlag>") which it has
obtained from QMetaType::fromName("Qt::Alignment").name().

In the QMetaProperty ctor it tries to resolve the QMetaEnum for the
property and uses the internal parse_scope() to extract the scope and
qualified key from the name. However it does not handle template names
and so fails with dynamically created properties.

This change to parse_scope() removes the "QFlags<>" so that the
template type can then be parsed.

Another solution would be for addProperty() to always use the type name
it was given rather than use QMetaType::fromName(). That has the
advantage that the layout of the dynamic meta-object would match that
generated by moc.

Change-Id: Iac9e2db2f134029709158b4e500286922396501d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5624060865e3ccd3c487f10355cb740b7322f93c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 20:51:12 +00:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global Tests: suppress has_denorm deprecation 2024-09-06 14:38:21 +00:00
io tst_QDebug: extend test with pair<references> 2024-10-28 14:30:11 +00:00
ipc ipctestcommon.h: port away from qsnprintf() 2024-07-30 16:47:32 +00:00
itemmodels QConcatenateTablesProxyModel: react to row and column moves 2024-09-13 17:44:05 +00:00
kernel Fix QFlag properties built by QMetaObjectBuilder 2024-10-29 20:51:12 +00:00
mimetypes Update tika-mimetypes.xml from upstream 2024-08-29 04:16:36 +00:00
platform Android: Add tests for QtAbstractListModel 2024-09-19 17:54:39 +00:00
plugin QUuid: restore sorting order of Qt < 6.8 2024-10-22 13:15:24 +00:00
serialization Tests: suppress has_denorm deprecation 2024-09-06 14:38:21 +00:00
text tst_QChar: run it also under QT_RESTRICTED_CAST_FROM_ASCII 2024-10-28 16:30:11 +02:00
thread QThreadPool: fix regression with negative expiryTimeout 2024-10-15 12:45:00 +00:00
time Address problems with date-time parsing near bounds 2024-10-22 18:53:18 +02:00
tools QList: fix std::to_address(QList::iterator) on older compilers 2024-10-29 01:10:27 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00