QMetaType: don't create a registry just to query its emptiness [2/2]
The previous commit, b0e4d53b637e6c34457d14ed3f0be705098bf2f5, missed this one. Same rationale as back then. Change-Id: Ibad4c130e0d61c64808275fa7b97b58ebd479acc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 5f5c4598fed4b4bdd95271d1fee8a57fbd21d033) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
21c6fdf6a1
commit
e0ad7fa80d
@ -148,9 +148,9 @@ Q_GLOBAL_STATIC(QMetaTypeCustomRegistry, customTypeRegistry)
|
||||
const char *QtMetaTypePrivate::typedefNameForType(const QtPrivate::QMetaTypeInterface *type_d)
|
||||
{
|
||||
const char *name = nullptr;
|
||||
QMetaTypeCustomRegistry *r = customTypeRegistry;
|
||||
if (!r)
|
||||
if (!customTypeRegistry.exists())
|
||||
return name;
|
||||
QMetaTypeCustomRegistry *r = &*customTypeRegistry;
|
||||
|
||||
QByteArrayView officialName(type_d->name);
|
||||
QReadLocker l(&r->lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user