summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
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/corelib/kernel/qvariant.h
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/corelib/kernel/qvariant.h')
-rw-r--r--src/corelib/kernel/qvariant.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 9df9c53802..40d3d5c3b1 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -49,6 +49,9 @@
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qobject.h>
+#ifndef QT_NO_DEBUG_STREAM
+#include <QtCore/qdebug.h>
+#endif
#ifndef QT_BOOTSTRAPPED
#include <QtCore/qbytearraylist.h>
#endif