QMetaType: remove an unused static pointer variable

Unlike the Gui and Widgets pointers, the Core one wasn't needed,
because the only user can inline the variables contents.

Saves one relocation.

Pick-to: 6.3
Change-Id: Ib7535e1a29c5125eea55c66dad6d2d1de72f6bc1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
bb10
Marc Mutz 2022-03-17 12:09:56 +01:00
parent 1b14569753
commit 7ed5b52e80
1 changed files with 1 additions and 2 deletions

View File

@ -1548,14 +1548,13 @@ static const struct : QMetaTypeModuleHelper
}
} metatypeHelper = {};
static const QMetaTypeModuleHelper *qMetaTypeCoreHelper = &metatypeHelper;
Q_CORE_EXPORT const QMetaTypeModuleHelper *qMetaTypeGuiHelper = nullptr;
Q_CORE_EXPORT const QMetaTypeModuleHelper *qMetaTypeWidgetsHelper = nullptr;
static const QMetaTypeModuleHelper *qModuleHelperForType(int type)
{
if (type <= QMetaType::LastCoreType)
return qMetaTypeCoreHelper;
return &metatypeHelper;
if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType)
return qMetaTypeGuiHelper;
else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType)