summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-09 15:33:05 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-18 13:48:16 +0200
commit9ceedd586321a2eeac4b63ee90d4e9726e143b78 (patch)
tree0647908ccaf4f4eca43140880eef4d4efe30f43d /src/gui
parent0b0acce5a7b2b209e6359e64d91d300a4eb70a3c (diff)
Make most of QMetaTypeInterface constexpr
The only thing we need to modify at runtime is the typeId and that can be mutable. This way we can have a constexpr ctor for QMetaType which hopefully makes the importing and exporting of related symbols less fickle. On Windows we cannot make QMetaTypeForType constexpr as that leads to mysterious errors in other places. Until we figure out why that is, we just leave this class as non-constexpr. This reveals that qcoreapplication.h and qvariant.h are using QDebug without including it. We now get template instantiation errors. Include qdebug.h to avoid that. Change-Id: If1bf0437ada52459c59c6fa45bab3d22dfb0bc92 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qguivariant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp
index d7e88025b9..c8200aedf1 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -104,7 +104,7 @@ static const struct : QMetaTypeModuleHelper
#define QT_IMPL_METATYPEINTERFACE_GUI_TYPES(MetaTypeName, MetaTypeId, RealName) \
QT_METATYPE_INTERFACE_INIT(RealName),
- QtPrivate::QMetaTypeInterface *interfaceForType(int type) const override {
+ const QtPrivate::QMetaTypeInterface *interfaceForType(int type) const override {
switch (type) {
QT_FOR_EACH_STATIC_GUI_CLASS(QT_METATYPE_CONVERT_ID_TO_TYPE)
default: return nullptr;