summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2022-01-15 17:06:38 +0100
committerThiago Macieira <thiago.macieira@intel.com>2022-01-17 08:51:23 +0000
commit260294346b60a7abab0a30106dd7c3a2ccc31a6e (patch)
tree507e3f074994d04dfac33ed06269ea0709d1e364 /src
parent74955f386d859ffe573487b73e17e81754bd6e8b (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index c380cda0db..4828ba0764 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -207,7 +207,7 @@ const char *QtMetaTypePrivate::typedefNameForType(const QtPrivate::QMetaTypeInte
#ifndef QT_NO_DEBUG
QByteArrayList otherNames;
for ( ; it != end; ++it) {
- if (it.value() == type_d)
+ if (it.value() == type_d && it.key() != officialName)
otherNames << it.key();
}
if (!otherNames.isEmpty())