qmetatype: Fix incorrect more than one typedef warning
The names are the keys of a hash so they can come in any order. That means the loop above, which stops before the end if it finds a name that is not the official one, may not have seen the official yet. If it has reached the end, then there is no typedef alias. Fixes: QTBUG-99620 Pick-to: 6.2 6.3 Change-Id: I3bd638766c494b32c665190d01db15c4cbc587b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
74955f386d
commit
260294346b
@ -207,7 +207,7 @@ const char *QtMetaTypePrivate::typedefNameForType(const QtPrivate::QMetaTypeInte
|
|||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
QByteArrayList otherNames;
|
QByteArrayList otherNames;
|
||||||
for ( ; it != end; ++it) {
|
for ( ; it != end; ++it) {
|
||||||
if (it.value() == type_d)
|
if (it.value() == type_d && it.key() != officialName)
|
||||||
otherNames << it.key();
|
otherNames << it.key();
|
||||||
}
|
}
|
||||||
if (!otherNames.isEmpty())
|
if (!otherNames.isEmpty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user