45 #include <QtCore/qglobal.h>
46 #include <QtCore/qatomic.h>
47 #include <QtCore/qbytearray.h>
48 #include <QtCore/qcompare.h>
49 #include <QtCore/qvarlengtharray.h>
50 #include <QtCore/qrefcount.h>
51 #include <QtCore/qscopeguard.h>
52 #include <QtCore/qdatastream.h>
53 #include <QtCore/qiterable.h>
55 #include <QtCore/qobjectdefs.h>
66 #error qmetatype.h must be included before any header file that defines Bool
81 #define QT_FOR_EACH_STATIC_PRIMITIVE_TYPE(F)\
86 F(LongLong, 4, qlonglong) \
87 F(ULongLong, 5, qulonglong) \
88 F(Double, 6, double) \
92 F(Char16, 56, char16_t) \
93 F(Char32, 57, char32_t) \
95 F(UShort, 36, ushort) \
98 F(SChar, 40, signed char) \
99 F(Nullptr, 51, std::nullptr_t) \
100 F(QCborSimpleType, 52, QCborSimpleType) \
102 #define QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(F)\
103 F(VoidStar, 31, void*) \
105 #if QT_CONFIG(easingcurve)
106 #define QT_FOR_EACH_STATIC_EASINGCURVE(F)\
107 F(QEasingCurve, 29, QEasingCurve)
109 #define QT_FOR_EACH_STATIC_EASINGCURVE(F)
112 #if QT_CONFIG(itemmodel)
113 #define QT_FOR_EACH_STATIC_ITEMMODEL_CLASS(F)\
114 F(QModelIndex, 42, QModelIndex) \
115 F(QPersistentModelIndex, 50, QPersistentModelIndex)
117 #define QT_FOR_EACH_STATIC_ITEMMODEL_CLASS(F)
120 #if QT_CONFIG(regularexpression)
121 # define QT_FOR_EACH_STATIC_REGULAR_EXPRESSION(F) \
122 F(QRegularExpression, 44, QRegularExpression)
124 # define QT_FOR_EACH_STATIC_REGULAR_EXPRESSION(F)
127 #define QT_FOR_EACH_STATIC_CORE_CLASS(F)\
129 F(QString, 10, QString) \
130 F(QByteArray, 12, QByteArray) \
131 F(QBitArray, 13, QBitArray) \
132 F(QDate, 14, QDate) \
133 F(QTime, 15, QTime) \
134 F(QDateTime, 16, QDateTime) \
136 F(QLocale, 18, QLocale) \
137 F(QRect, 19, QRect) \
138 F(QRectF, 20, QRectF) \
139 F(QSize, 21, QSize) \
140 F(QSizeF, 22, QSizeF) \
141 F(QLine, 23, QLine) \
142 F(QLineF, 24, QLineF) \
143 F(QPoint, 25, QPoint) \
144 F(QPointF, 26, QPointF) \
145 QT_FOR_EACH_STATIC_EASINGCURVE(F) \
146 F(QUuid, 30, QUuid) \
147 F(QVariant, 41, QVariant) \
148 QT_FOR_EACH_STATIC_REGULAR_EXPRESSION(F) \
149 F(QJsonValue, 45, QJsonValue) \
150 F(QJsonObject, 46, QJsonObject) \
151 F(QJsonArray, 47, QJsonArray) \
152 F(QJsonDocument, 48, QJsonDocument) \
153 F(QCborValue, 53, QCborValue) \
154 F(QCborArray, 54, QCborArray) \
155 F(QCborMap, 55, QCborMap) \
156 QT_FOR_EACH_STATIC_ITEMMODEL_CLASS(F)
158 #define QT_FOR_EACH_STATIC_CORE_POINTER(F)\
159 F(QObjectStar, 39, QObject*)
161 #define QT_FOR_EACH_STATIC_CORE_TEMPLATE(F)\
162 F(QVariantMap, 8, QVariantMap) \
163 F(QVariantList, 9, QVariantList) \
164 F(QVariantHash, 28, QVariantHash) \
165 F(QVariantPair, 58, QVariantPair) \
166 F(QByteArrayList, 49, QByteArrayList) \
167 F(QStringList, 11, QStringList) \
169 #if QT_CONFIG(shortcut)
170 #define QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F)\
171 F(QKeySequence, 0x100b, QKeySequence)
173 #define QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F)
176 #define QT_FOR_EACH_STATIC_GUI_CLASS(F)\
177 F(QFont, 0x1000, QFont) \
178 F(QPixmap, 0x1001, QPixmap) \
179 F(QBrush, 0x1002, QBrush) \
180 F(QColor, 0x1003, QColor) \
181 F(QPalette, 0x1004, QPalette) \
182 F(QIcon, 0x1005, QIcon) \
183 F(QImage, 0x1006, QImage) \
184 F(QPolygon, 0x1007, QPolygon) \
185 F(QRegion, 0x1008, QRegion) \
186 F(QBitmap, 0x1009, QBitmap) \
187 F(QCursor, 0x100a, QCursor) \
188 QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F) \
189 F(QPen, 0x100c, QPen) \
190 F(QTextLength, 0x100d, QTextLength) \
191 F(QTextFormat, 0x100e, QTextFormat) \
192 F(QTransform, 0x1010, QTransform) \
193 F(QMatrix4x4, 0x1011, QMatrix4x4) \
194 F(QVector2D, 0x1012, QVector2D) \
195 F(QVector3D, 0x1013, QVector3D) \
196 F(QVector4D, 0x1014, QVector4D) \
197 F(QQuaternion, 0x1015, QQuaternion) \
198 F(QPolygonF, 0x1016, QPolygonF) \
199 F(QColorSpace, 0x1017, QColorSpace) \
202 #define QT_FOR_EACH_STATIC_WIDGETS_CLASS(F)\
203 F(QSizePolicy, 0x2000, QSizePolicy) \
206 #define QT_FOR_EACH_STATIC_ALIAS_TYPE(F)\
207 F(ULong, -1, ulong, "unsigned long") \
208 F(UInt, -1, uint, "unsigned int") \
209 F(UShort, -1, ushort, "unsigned short") \
210 F(UChar, -1, uchar, "unsigned char") \
211 F(LongLong, -1, qlonglong, "long long") \
212 F(ULongLong, -1, qulonglong, "unsigned long long") \
213 F(SChar, -1, signed char, "qint8") \
214 F(UChar, -1, uchar, "quint8") \
215 F(Short, -1, short, "qint16") \
216 F(UShort, -1, ushort, "quint16") \
217 F(Int, -1, int, "qint32") \
218 F(UInt, -1, uint, "quint32") \
219 F(LongLong, -1, qlonglong, "qint64") \
220 F(ULongLong, -1, qulonglong, "quint64") \
221 F(QVariantList, -1, QVariantList, "QList<QVariant>") \
222 F(QVariantMap, -1, QVariantMap, "QMap<QString,QVariant>") \
223 F(QVariantHash, -1, QVariantHash, "QHash<QString,QVariant>") \
224 F(QVariantPair, -1, QVariantPair, "QPair<QVariant,QVariant>") \
225 F(QByteArrayList, -1, QByteArrayList, "QList<QByteArray>") \
226 F(QStringList, -1, QStringList, "QList<QString>") \
228 #define QT_FOR_EACH_STATIC_TYPE(F)\
229 QT_FOR_EACH_STATIC_PRIMITIVE_TYPE(F)\
230 QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(F)\
231 QT_FOR_EACH_STATIC_CORE_CLASS(F)\
232 QT_FOR_EACH_STATIC_CORE_POINTER(F)\
233 QT_FOR_EACH_STATIC_CORE_TEMPLATE(F)\
234 QT_FOR_EACH_STATIC_GUI_CLASS(F)\
235 QT_FOR_EACH_STATIC_WIDGETS_CLASS(F)\
237 #define QT_DEFINE_METATYPE_ID(TypeName, Id, Name) \
240 #define QT_FOR_EACH_AUTOMATIC_TEMPLATE_1ARG(F) \
247 #define QT_FOR_EACH_AUTOMATIC_TEMPLATE_2ARG(F) \
251 #define QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(F) \
303 template<
typename From,
typename To>
309 template<
typename T,
bool>
310 struct SequentialValueTypeIsMetaType;
311 template<
typename T,
bool>
313 template<
typename T,
bool>
315 template<
typename,
typename>
321 template<
typename Enum>
342 HighestInternalId = LastWidgetsType,
352 UnknownType = 0,
Bool = 1,
Int = 2,
UInt = 3, LongLong = 4, ULongLong = 5,
354 UChar = 37,
Float = 38,
368 Char16 = 56, Char32 = 57,
379 LastCoreType = Char32,
386 NeedsConstruction = 0x1,
387 NeedsDestruction = 0x2,
388 RelocatableType = 0x4,
389 #if QT_DEPRECATED_SINCE(6, 0)
392 PointerToQObject = 0x8,
393 IsEnumeration = 0x10,
394 SharedPointerToQObject = 0x20,
395 WeakPointerToQObject = 0x40,
396 TrackingPointerToQObject = 0x80,
397 IsUnsignedEnumeration = 0x100,
399 PointerToGadget = 0x400,
408 #if QT_DEPRECATED_SINCE(6, 0)
419 static int sizeOf(
int type)
422 static TypeFlags typeFlags(
int type)
428 static void *
create(
int type,
const void *copy =
nullptr)
434 static void *construct(
int type,
void *where,
const void *copy)
437 static void destruct(
int type,
void *where)
440 static bool isRegistered(
int type);
446 bool isValid()
const;
447 bool isRegistered()
const;
448 #if QT_CORE_REMOVED_SINCE(6, 1) || defined(Q_QDOC)
453 int id(
int = 0)
const
457 if (
int id = d_ptr->typeId.loadRelaxed())
466 constexpr TypeFlags
flags()
const;
468 constexpr
const char *
name()
const;
470 void *
create(
const void *copy =
nullptr)
const;
472 void *construct(
void *where,
const void *copy =
nullptr)
const;
473 void destruct(
void *
data)
const;
475 bool equals(
const void *lhs,
const void *
rhs)
const;
477 bool isEqualityComparable()
const;
478 bool isOrdered()
const;
480 #ifndef QT_NO_DATASTREAM
483 bool hasRegisteredDataStreamOperators()
const;
485 #if QT_DEPRECATED_SINCE(6, 0)
501 if (
a.d_ptr ==
b.d_ptr)
503 if (!
a.d_ptr || !
b.d_ptr)
506 const int aId =
a.id();
507 const int bId =
b.id();
514 #ifndef QT_NO_DEBUG_STREAM
515 bool debugStream(
QDebug& dbg,
const void *
rhs);
516 bool hasRegisteredDebugStreamOperator()
const;
518 #if QT_DEPRECATED_SINCE(6, 0)
520 static bool debugStream(
QDebug& dbg,
const void *
rhs,
int typeId)
524 static bool hasRegisteredDebugStreamOperator()
525 {
return QMetaType::fromType<T>().hasRegisteredDebugStreamOperator(); }
527 static bool hasRegisteredDebugStreamOperator(
int typeId)
539 template<
typename From,
typename To>
542 return registerConverter<From, To>(QtPrivate::convertImplicit<From, To>);
546 template<
typename From,
typename To>
550 "QMetaType::registerConverter: At least one of the types must be a custom type.");
552 const QMetaType fromType = QMetaType::fromType<From>();
553 const QMetaType toType = QMetaType::fromType<To>();
554 auto converter = [
function](
const void *from,
void *to) ->
bool {
555 const From *
f =
static_cast<const From *
>(from);
556 To *
t =
static_cast<To *
>(to);
557 *
t = (
f->*
function)();
560 return registerConverterImpl<From, To>(converter, fromType, toType);
564 template<
typename From,
typename To>
568 "QMetaType::registerMutableView: At least one of the types must be a custom type.");
570 const QMetaType fromType = QMetaType::fromType<From>();
571 const QMetaType toType = QMetaType::fromType<To>();
572 auto view = [
function](
void *from,
void *to) ->
bool {
573 From *
f =
static_cast<From *
>(from);
574 To *
t =
static_cast<To *
>(to);
575 *
t = (
f->*
function)();
578 return registerMutableViewImpl<From, To>(
view, fromType, toType);
582 template<
typename From,
typename To>
586 "QMetaType::registerConverter: At least one of the types must be a custom type.");
588 const QMetaType fromType = QMetaType::fromType<From>();
589 const QMetaType toType = QMetaType::fromType<To>();
590 auto converter = [
function](
const void *from,
void *to) ->
bool {
591 const From *
f =
static_cast<const From *
>(from);
592 To *
t =
static_cast<To *
>(to);
599 return registerConverterImpl<From, To>(converter, fromType, toType);
603 template<
typename From,
typename To,
typename UnaryFunction>
607 "QMetaType::registerConverter: At least one of the types must be a custom type.");
609 const QMetaType fromType = QMetaType::fromType<From>();
610 const QMetaType toType = QMetaType::fromType<To>();
611 auto converter = [
function = std::move(
function)](
const void *from,
void *to) ->
bool {
612 const From *
f =
static_cast<const From *
>(from);
613 To *
t =
static_cast<To *
>(to);
617 return registerConverterImpl<From, To>(std::move(converter), fromType, toType);
621 template<
typename From,
typename To,
typename UnaryFunction>
625 "QMetaType::registerMutableView: At least one of the types must be a custom type.");
627 const QMetaType fromType = QMetaType::fromType<From>();
628 const QMetaType toType = QMetaType::fromType<To>();
629 auto view = [
function = std::move(
function)](
void *from,
void *to) ->
bool {
630 From *
f =
static_cast<From *
>(from);
631 To *
t =
static_cast<To *
>(to);
635 return registerMutableViewImpl<From, To>(std::move(
view), fromType, toType);
639 template<
typename From,
typename To>
640 static bool registerConverterImpl(ConverterFunction converter,
QMetaType fromType,
QMetaType toType)
642 if (registerConverterFunction(std::move(converter), fromType, toType)) {
644 unregisterConverterFunction(fromType, toType);
652 template<
typename From,
typename To>
655 if (registerMutableViewFunction(std::move(
view), fromType, toType)) {
657 unregisterMutableViewFunction(fromType, toType);
671 #if QT_DEPRECATED_SINCE(6, 0)
673 static bool convert(
const void *from,
int fromTypeId,
void *to,
int toTypeId)
676 static bool compare(
const void *lhs,
const void *
rhs,
int typeId,
int *
result)
679 auto c =
t.compare(lhs,
rhs);
695 static bool equals(
const void *lhs,
const void *
rhs,
int typeId,
int *
result)
698 if (!
t.isEqualityComparable())
705 template<
typename From,
typename To>
709 QMetaType::fromType<From>(), QMetaType::fromType<To>());
714 template<
typename From,
typename To>
717 return hasRegisteredMutableViewFunction(
718 QMetaType::fromType<From>(), QMetaType::fromType<To>());
737 #if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
743 int idHelper()
const;
748 #undef QT_DEFINE_METATYPE_ID
752 #define QT_METATYPE_PRIVATE_DECLARE_TYPEINFO(C, F) \
754 Q_DECLARE_TYPEINFO(QtMetaTypePrivate:: C, (F)); \
755 namespace QtMetaTypePrivate {
767 typedef void (*getFunc)(
const void *
const *
p,
void *);
774 { *
static_cast<typename T::first_type *
>(dataPtr) =
static_cast<const T*
>(*pair)->first; }
777 { *
static_cast<typename T::second_type *
>(dataPtr) =
static_cast<const T*
>(*pair)->second; }
782 , _metaType_first(
QMetaType::fromType<typename
T::first_type>())
783 , _metaType_second(
QMetaType::fromType<typename
T::second_type>())
784 , _getFirst(getFirstImpl<
T>)
785 , _getSecond(getSecondImpl<
T>)
796 inline void first(
void *dataPtr)
const { _getFirst(&_pair, dataPtr); }
797 inline void second(
void *dataPtr)
const { _getSecond(&_pair, dataPtr); }
801 template<
typename From>
804 template<
typename T,
typename U>
817 #define QT_FORWARD_DECLARE_SHARED_POINTER_TYPES_ITER(Name) \
818 template <class T> class Name; \
853 #ifndef QT_NO_QOBJECT
858 static_assert(
sizeof(
T),
"Type argument of Q_PROPERTY or Q_DECLARE_METATYPE(T*) must be fully defined");
859 enum {
Value =
sizeof(checkType(
static_cast<T*
>(
nullptr))) ==
sizeof(
yes_type) };
862 template<
typename T,
typename Enable =
void>
863 struct IsGadgetHelper {
enum { IsRealGadget =
false, IsGadgetOrDerivedFrom =
false }; };
868 template <
typename X>
872 IsRealGadget =
sizeof(checkType(&T::qt_check_for_QGADGET_macro)) ==
sizeof(
void *),
873 IsGadgetOrDerivedFrom =
true
877 template<
typename T,
typename Enable =
void>
884 template <
typename X>
907 template<
typename T,
typename Enable =
void>
914 #ifndef QT_NO_QOBJECT
1011 template<typename T, bool = QMetaTypeId2<typename T::value_type>::Defined>
1025 template<
typename T>
1044 template<typename T, bool = QMetaTypeId2<typename T::key_type>::Defined>
1058 template<typename T, bool = QMetaTypeId2<typename T::mapped_type>::Defined>
1072 template<
typename T>
1077 template<typename T, bool = QMetaTypeId2<typename T::first_type>::Defined
1087 template<
typename T>
1090 inline static bool registerConverter();
1093 template<
typename T>
1101 template<
typename T,
typename U>
1104 template<
typename T>
1107 template<
typename T,
typename =
void>
1113 #if QT_CONFIG(future)
1114 template<
typename T>
1115 struct MetaTypeQFutureHelper
1117 static bool registerConverter() {
return false; }
1124 template <
typename T,
int =
1136 template <
typename T>
1141 template <
typename T>
1149 template <
typename T>
1152 template <
typename T>
1156 template <typename T, bool Defined = QMetaTypeId2<T>::Defined>
1167 template <
typename Result,
typename...
Args>
1170 template<
typename T>
1175 template<
typename T>
1178 template<
typename T>
1198 template<
typename T,
bool defined>
1204 template<
typename SmartPo
inter>
1209 return p.operator->();
1215 template <
typename T>
1216 struct EnableInternalDataWrap;
1218 template<
typename T>
1228 template <
typename T>
1231 #ifndef QT_NO_QOBJECT
1233 "qRegisterNormalizedMetaType",
1234 "qRegisterNormalizedMetaType was called with a not normalized type name, "
1235 "please call qRegisterMetaType instead.");
1238 const QMetaType metaType = QMetaType::fromType<T>();
1239 const int id = metaType.
id();
1247 #if QT_CONFIG(future)
1248 QtPrivate::MetaTypeQFutureHelper<T>::registerConverter();
1251 if (normalizedTypeName != metaType.
name())
1267 template <
typename T>
1270 return qRegisterNormalizedMetaTypeImplementation<T>(normalizedTypeName);
1273 #define QT_DECL_METATYPE_EXTERN_TAGGED(TYPE, TAG, EXPORT) \
1274 QT_BEGIN_NAMESPACE \
1275 EXPORT int qRegisterNormalizedMetaType_ ## TAG (const QByteArray &); \
1276 template <> inline int qRegisterNormalizedMetaType< TYPE >(const QByteArray &name) \
1277 { return qRegisterNormalizedMetaType_ ## TAG (name); } \
1279 Q_DECLARE_METATYPE(TYPE) \
1281 #define QT_IMPL_METATYPE_EXTERN_TAGGED(TYPE, TAG) \
1282 int qRegisterNormalizedMetaType_ ## TAG (const QByteArray &name) \
1283 { return qRegisterNormalizedMetaTypeImplementation< TYPE >(name); } \
1285 #define QT_DECL_METATYPE_EXTERN(TYPE, EXPORT) \
1286 QT_DECL_METATYPE_EXTERN_TAGGED(TYPE, TYPE, EXPORT)
1287 #define QT_IMPL_METATYPE_EXTERN(TYPE) \
1288 QT_IMPL_METATYPE_EXTERN_TAGGED(TYPE, TYPE)
1290 template <
typename T>
1293 #ifdef QT_NO_QOBJECT
1298 return qRegisterNormalizedMetaType<T>(normalizedTypeName);
1301 template <
typename T>
1307 return QMetaType::fromType<T>().id();
1311 template <
typename T>
1314 int id = qMetaTypeId<T>();
1318 #ifndef QT_NO_QOBJECT
1319 template <
typename T>
1331 const char *
const cName = T::staticMetaObject.className();
1334 typeName.append(cName).append(
'*');
1335 const int newId = qRegisterNormalizedMetaType<T *>(
typeName);
1341 template <
typename T>
1353 const char *
const cName = T::staticMetaObject.className();
1354 const int newId = qRegisterNormalizedMetaType<T>(cName);
1360 template <
typename T>
1372 const char *
const cName = T::staticMetaObject.className();
1375 typeName.append(cName).append(
'*');
1376 const int newId = qRegisterNormalizedMetaType<T *>(
typeName);
1382 template <
typename T>
1394 const char *eName = qt_getEnumName(
T());
1398 typeName.append(cName).append(
"::").append(eName);
1399 const int newId = qRegisterNormalizedMetaType<T>(
typeName);
1406 #define Q_DECLARE_OPAQUE_POINTER(POINTER) \
1407 QT_BEGIN_NAMESPACE namespace QtPrivate { \
1409 struct IsPointerToTypeDerivedFromQObject<POINTER > \
1411 enum { Value = false }; \
1413 } QT_END_NAMESPACE \
1417 #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
1418 #define Q_DECLARE_METATYPE_IMPL(TYPE) \
1419 QT_BEGIN_NAMESPACE \
1421 struct QMetaTypeId< TYPE > \
1423 enum { Defined = 1 }; \
1424 static int qt_metatype_id() \
1426 static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
1427 if (const int id = metatype_id.loadAcquire()) \
1429 constexpr auto arr = QtPrivate::typenameHelper<TYPE>(); \
1430 auto name = arr.data(); \
1431 if (QByteArrayView(name) == (#TYPE)) { \
1432 const int id = qRegisterNormalizedMetaType<TYPE>(name); \
1433 metatype_id.storeRelease(id); \
1436 const int newId = qRegisterMetaType< TYPE >(#TYPE); \
1437 metatype_id.storeRelease(newId); \
1444 #define Q_DECLARE_BUILTIN_METATYPE(TYPE, METATYPEID, NAME) \
1445 QT_BEGIN_NAMESPACE \
1446 template<> struct QMetaTypeId2<NAME> \
1448 using NameAsArrayType = std::array<char, sizeof(#NAME)>; \
1449 enum { Defined = 1, IsBuiltIn = true, MetaType = METATYPEID }; \
1450 static inline constexpr int qt_metatype_id() { return METATYPEID; } \
1451 static constexpr NameAsArrayType nameAsArray = { #NAME }; \
1455 #define QT_FORWARD_DECLARE_STATIC_TYPES_ITER(TypeName, TypeId, Name) \
1462 #undef QT_FORWARD_DECLARE_STATIC_TYPES_ITER
1464 #define Q_DECLARE_METATYPE_TEMPLATE_1ARG(SINGLE_ARG_TEMPLATE) \
1465 QT_BEGIN_NAMESPACE \
1466 template <typename T> \
1467 struct QMetaTypeId< SINGLE_ARG_TEMPLATE<T> > \
1470 Defined = QMetaTypeId2<T>::Defined \
1472 static int qt_metatype_id() \
1474 static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
1475 if (const int id = metatype_id.loadRelaxed()) \
1477 const char *tName = QMetaType::fromType<T>().name(); \
1479 const size_t tNameLen = qstrlen(tName); \
1480 QByteArray typeName; \
1481 typeName.reserve(sizeof(#SINGLE_ARG_TEMPLATE) + 1 + tNameLen + 1 + 1); \
1482 typeName.append(#SINGLE_ARG_TEMPLATE, int(sizeof(#SINGLE_ARG_TEMPLATE)) - 1) \
1483 .append('<').append(tName, tNameLen); \
1484 typeName.append('>'); \
1485 const int newId = qRegisterNormalizedMetaType< SINGLE_ARG_TEMPLATE<T> >(typeName); \
1486 metatype_id.storeRelease(newId); \
1492 #define Q_DECLARE_METATYPE_TEMPLATE_2ARG(DOUBLE_ARG_TEMPLATE) \
1493 QT_BEGIN_NAMESPACE \
1494 template<typename T, typename U> \
1495 struct QMetaTypeId< DOUBLE_ARG_TEMPLATE<T, U> > \
1498 Defined = QMetaTypeId2<T>::Defined && QMetaTypeId2<U>::Defined \
1500 static int qt_metatype_id() \
1502 static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
1503 if (const int id = metatype_id.loadAcquire()) \
1505 const char *tName = QMetaType::fromType<T>().name(); \
1506 const char *uName = QMetaType::fromType<U>().name(); \
1509 const size_t tNameLen = qstrlen(tName); \
1510 const size_t uNameLen = qstrlen(uName); \
1511 QByteArray typeName; \
1512 typeName.reserve(sizeof(#DOUBLE_ARG_TEMPLATE) + 1 + tNameLen + 1 + uNameLen + 1 + 1); \
1513 typeName.append(#DOUBLE_ARG_TEMPLATE, int(sizeof(#DOUBLE_ARG_TEMPLATE)) - 1) \
1514 .append('<').append(tName, tNameLen).append(',').append(uName, uNameLen); \
1515 typeName.append('>'); \
1516 const int newId = qRegisterNormalizedMetaType< DOUBLE_ARG_TEMPLATE<T, U> >(typeName); \
1517 metatype_id.storeRelease(newId); \
1525 template<
typename T,
bool =
false>
1539 #define Q_DECLARE_SMART_POINTER_METATYPE(SMART_POINTER) \
1540 QT_BEGIN_NAMESPACE \
1541 namespace QtPrivate { \
1542 template<typename T> \
1543 struct SharedPointerMetaTypeIdHelper<SMART_POINTER<T>, true> \
1548 static int qt_metatype_id() \
1550 static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
1551 if (const int id = metatype_id.loadAcquire()) \
1553 const char * const cName = T::staticMetaObject.className(); \
1554 QByteArray typeName; \
1555 typeName.reserve(sizeof(#SMART_POINTER) + 1 + strlen(cName) + 1); \
1556 typeName.append(#SMART_POINTER, int(sizeof(#SMART_POINTER)) - 1) \
1557 .append('<').append(cName).append('>'); \
1558 const int newId = qRegisterNormalizedMetaType< SMART_POINTER<T> >(typeName); \
1559 metatype_id.storeRelease(newId); \
1563 template<typename T> \
1564 struct MetaTypeSmartPointerHelper<SMART_POINTER<T> , \
1565 typename std::enable_if<IsPointerToTypeDerivedFromQObject<T*>::Value && !std::is_const_v<T>>::type> \
1567 static bool registerConverter() \
1569 const QMetaType to = QMetaType(QMetaType::QObjectStar); \
1570 if (!QMetaType::hasRegisteredConverterFunction(QMetaType::fromType<SMART_POINTER<T>>(), to)) { \
1571 QtPrivate::QSmartPointerConvertFunctor<SMART_POINTER<T> > o; \
1572 return QMetaType::registerConverter<SMART_POINTER<T>, QObject*>(o); \
1578 template <typename T> \
1579 struct QMetaTypeId< SMART_POINTER<T> > \
1580 : QtPrivate::SharedPointerMetaTypeIdHelper< SMART_POINTER<T>, \
1581 QtPrivate::IsPointerToTypeDerivedFromQObject<T*>::Value> \
1586 #define Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(SINGLE_ARG_TEMPLATE) \
1587 QT_BEGIN_NAMESPACE \
1588 namespace QtPrivate { \
1589 template<typename T> \
1590 struct IsSequentialContainer<SINGLE_ARG_TEMPLATE<T> > \
1592 enum { Value = true }; \
1596 Q_DECLARE_METATYPE_TEMPLATE_1ARG(SINGLE_ARG_TEMPLATE)
1598 #define Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE_ITER(TEMPLATENAME) \
1599 Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(TEMPLATENAME)
1605 #undef Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE_ITER
1610 #define Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE(TEMPLATENAME) \
1611 QT_BEGIN_NAMESPACE \
1612 namespace QtPrivate { \
1613 template<typename T, typename U> \
1614 struct IsAssociativeContainer<TEMPLATENAME<T, U> > \
1616 enum { Value = true }; \
1620 Q_DECLARE_METATYPE_TEMPLATE_2ARG(TEMPLATENAME)
1628 #define Q_DECLARE_METATYPE_TEMPLATE_SMART_POINTER_ITER(TEMPLATENAME) \
1629 Q_DECLARE_SMART_POINTER_METATYPE(TEMPLATENAME)
1635 #undef Q_DECLARE_METATYPE_TEMPLATE_SMART_POINTER_ITER
1644 template <
typename T>
1647 const QMetaType to = QMetaType::fromType<QtMetaTypePrivate::QPairVariantInterfaceImpl>();
1650 return QMetaType::registerConverter<T, QtMetaTypePrivate::QPairVariantInterfaceImpl>(
o);
1657 template<
typename From>
1666 template<
typename From>
1675 template<
typename T>
1680 const QMetaType to = QMetaType::fromType<QIterable<QMetaSequence>>();
1683 return QMetaType::registerConverter<T, QIterable<QMetaSequence>>(
o);
1690 const QMetaType to = QMetaType::fromType<QIterable<QMetaSequence>>();
1693 return QMetaType::registerMutableView<T, QIterable<QMetaSequence>>(
o);
1699 template<
typename From>
1708 template<
typename From>
1719 template<
typename T>
1724 const QMetaType to = QMetaType::fromType<QIterable<QMetaAssociation>>();
1727 return QMetaType::registerConverter<T, QIterable<QMetaAssociation>>(
o);
1734 const QMetaType to = QMetaType::fromType<QIterable<QMetaAssociation>>();
1737 return QMetaType::registerMutableView<T, QIterable<QMetaAssociation>>(
o);
1752 return ((
s >=
'a' &&
s <=
'z') || (
s >=
'A' &&
s <=
'Z') || (
s >=
'0' &&
s <=
'9')
1755 static constexpr
bool is_space(
char s) {
return (
s ==
' ' ||
s ==
'\t' ||
s ==
'\n'); }
1756 static constexpr
bool is_number(
char s) {
return s >=
'0' &&
s <=
'9'; }
1757 static constexpr
bool starts_with_token(
const char *
b,
const char *
e,
const char *
token,
1758 bool msvcKw =
false)
1775 static constexpr
bool skipToken(
const char *&
x,
const char *
e,
const char *
token,
1776 bool msvcKw =
false)
1778 if (!starts_with_token(
x,
e,
token, msvcKw))
1786 static constexpr
const char *skipString(
const char *
x,
const char *
e)
1790 while (
x !=
e && *
x != delim) {
1802 static constexpr
const char *skipTemplate(
const char *
x,
const char *
e,
bool stopAtComa =
false)
1805 int templateDepth = 0;
1813 if (stopAtComa && !scopeDepth && !templateDepth)
1818 if (--templateDepth < 0)
1832 if (is_number(
x[-1]))
1836 x = skipString(
x,
e);
1852 constexpr
void replaceLast(
char x)
1859 constexpr
void appendStr(
const char *
x)
1865 constexpr
void normalizeIntegerTypes(
const char *&
begin,
const char *
end)
1869 int numUnsigned = 0;
1874 if (skipToken(
begin,
end,
"long")) {
1878 if (skipToken(
begin,
end,
"int")) {
1882 if (skipToken(
begin,
end,
"short")) {
1886 if (skipToken(
begin,
end,
"unsigned")) {
1890 if (skipToken(
begin,
end,
"signed")) {
1894 if (skipToken(
begin,
end,
"char")) {
1899 if (skipToken(
begin,
end,
"__int64")) {
1908 if (numSigned && numChar)
1909 appendStr(
"signed ");
1910 else if (numUnsigned)
1916 else if (numLong == 1)
1918 else if (numLong == 2)
1919 appendStr(
"longlong");
1920 else if (numUnsigned || numSigned || numInt)
1924 constexpr
void skipStructClassOrEnum(
const char *&
begin,
const char *
end)
1928 skipToken(
begin,
end,
"struct",
true) || skipToken(
begin,
end,
"class",
true)
1929 || skipToken(
begin,
end,
"enum",
true);
1932 constexpr
void skipQtNamespace(
const char *&
begin,
const char *
end)
1935 const char *nsbeg =
begin;
1936 if (skipToken(nsbeg,
end,
QT_STRINGIFY(QT_NAMESPACE)) && nsbeg + 2 <
end && nsbeg[0] ==
':'
1937 && nsbeg[1] ==
':') {
1949 #if defined(Q_CC_CLANG) || defined (Q_CC_GNU)
1953 constexpr
int normalizeTypeFromSignature(
const char *
begin,
const char *
end)
1957 #if defined (Q_CC_CLANG)
1958 if (
name.find(
"anonymous ") != std::string_view::npos)
1961 if (
name.find(
"unnamed ") != std::string_view::npos)
1964 if (*
begin ==
' ') {
1965 if (last ==
',' || last ==
'>' || last ==
'<' || last ==
'*' || last ==
'&') {
1972 replaceLast(*
begin);
1999 {
return normalizeType(
begin,
end); }
2012 const char *cst =
begin + 1;
2015 bool seenStar =
false;
2016 bool hasMiddleConst =
false;
2018 if (*cst ==
'\"' || (*cst ==
'\'' && !is_number(cst[-1]))) {
2019 cst = skipString(cst,
end);
2026 if (*cst ==
'&' || *cst ==
'*' || *cst ==
'[') {
2027 seenStar = *cst !=
'&' || cst != (
end - 1);
2031 cst = skipTemplate(cst + 1,
end);
2036 const char *skipedCst = cst;
2038 const char *testEnd =
end;
2039 while (skipedCst < testEnd--) {
2040 if (*testEnd ==
'*' || *testEnd ==
'['
2041 || (*testEnd ==
'&' && testEnd != (
end - 1))) {
2045 if (*testEnd ==
'>')
2048 if (adjustConst && !seenStar) {
2049 if (*(
end - 1) ==
'&')
2052 appendStr(
"const ");
2054 normalizeType(
begin, cst,
false);
2056 hasMiddleConst =
true;
2060 if (skipToken(
begin,
end,
"const")) {
2061 if (adjustConst && !seenStar) {
2062 if (*(
end - 1) ==
'&')
2065 appendStr(
"const ");
2068 if (seenStar && adjustConst) {
2069 const char *
e =
end;
2070 if (*(
end - 1) ==
'&' && *(
end - 2) !=
'&')
2074 const char *
token =
"tsnoc";
2087 if (skipToken(
begin,
end,
"QVector")) {
2092 if (skipToken(
begin,
end,
"QPair")) {
2094 appendStr(
"std::pair");
2097 if (!hasMiddleConst)
2101 bool spaceSkiped =
true;
2106 }
else if ((
c ==
'\'' && !is_number(last)) ||
c ==
'\"') {
2115 spaceSkiped =
false;
2119 const char *tpl = skipTemplate(
begin,
end,
true);
2120 normalizeType(
begin, tpl,
false);
2125 }
while (*
begin++ ==
',');
2141 template<
typename T>
2144 template <
typename T1_,
typename T2_>
2150 template<
typename T>
2161 t1Name = typenameHelper<T1>();
2166 t2Name = typenameHelper<T2>();
2168 constexpr
auto nonTypeDependentLen =
sizeof(
"std::pair<,>");
2169 constexpr
auto t1Len = t1Name.size() - 1;
2170 constexpr
auto t2Len = t2Name.size() - 1;
2171 constexpr
auto length = nonTypeDependentLen + t1Len + t2Len;
2172 std::array<char, length + 1>
result {};
2173 constexpr
auto prefix =
"std::pair<";
2174 int currentLength = 0;
2175 for (; currentLength < int(
sizeof(
"std::pair<") - 1); ++currentLength)
2176 result[currentLength] = prefix[currentLength];
2177 for (
int i = 0;
i < int(t1Len); ++currentLength, ++
i)
2178 result[currentLength] = t1Name[
i];
2179 result[currentLength++] =
',';
2180 for (
int i = 0;
i < int(t2Len); ++currentLength, ++
i)
2181 result[currentLength] = t2Name[
i];
2182 result[currentLength++] =
'>';
2183 result[currentLength++] =
'\0';
2186 constexpr
auto prefix =
sizeof(
2190 #if defined(Q_CC_MSVC) && defined(Q_CC_CLANG)
2191 "auto __cdecl QtPrivate::typenameHelper(void) [T = "
2192 #elif defined(Q_CC_MSVC)
2193 "auto __cdecl QtPrivate::typenameHelper<"
2194 #elif defined(Q_CC_CLANG)
2195 "auto QtPrivate::typenameHelper() [T = "
2196 #elif defined(Q_CC_GHS)
2197 "auto QtPrivate::typenameHelper<T>()[with T="
2199 "constexpr auto QtPrivate::typenameHelper() [with T = "
2202 #if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
2203 constexpr
int suffix =
sizeof(
">(void)");
2205 constexpr
int suffix =
sizeof(
"]");
2208 #if defined(Q_CC_GNU_ONLY) && Q_CC_GNU_ONLY < 804
2216 constexpr
const char *
begin =
func + prefix;
2220 std::array<char, len + 1>
result {};
2226 template<
typename T,
typename =
void>
2230 template<
typename T>
2232 : std::integral_constant<int, QMetaTypeId2<T>::MetaType>
2236 template<
typename T,
bool = (QTypeTraits::has_operator_equal_v<T> && !std::is_po
inter_v<T>)>
2242 {
return *
reinterpret_cast<const T *
>(
a) == *
reinterpret_cast<const T *
>(
b); }
2246 template<
typename T>
2252 template<
typename T,
bool = (QTypeTraits::has_operator_less_than_v<T> && !std::is_po
inter_v<T>)>
2256 {
return *
reinterpret_cast<const T *
>(
a) < *
reinterpret_cast<const T *
>(
b); }
2259 template<
typename T>
2265 template<
typename T,
bool = (QTypeTraits::has_ostream_operator_v<QDebug, T> && !std::is_po
inter_v<T>)>
2269 { dbg << *reinterpret_cast<const T *>(
a); }
2272 template<
typename T>
2278 template<
typename T,
bool = QTypeTraits::has_stream_operator_v<QDataStream, T>>
2282 { ds << *reinterpret_cast<const T *>(
a); }
2284 { ds >> *
reinterpret_cast<T *
>(
a); }
2287 template<
typename T>
2294 template<
typename S>
2302 if constexpr (std::is_default_constructible_v<S>) {
2311 if constexpr (std::is_copy_constructible_v<S>) {
2313 new (
addr)
S(*
reinterpret_cast<const S *
>(
other));
2322 if constexpr (std::is_move_constructible_v<S>) {
2324 new (
addr)
S(std::move(*
reinterpret_cast<S *
>(
other)));
2333 if constexpr (std::is_destructible_v<S> && !std::is_trivially_destructible_v<S>)
2335 reinterpret_cast<S *
>(
addr)->~
S();
2360 template<
typename T>
2410 #undef QT_METATYPE_CONSTEXPRLAMDA
2416 #if !defined(QT_BOOTSTRAPPED) && !defined(Q_CC_MSVC)
2418 #if !defined(QT_BUILD_CORE_LIB)
2419 #define QT_METATYPE_TEMPLATE_EXPORT Q_CORE_EXPORT
2421 #define QT_METATYPE_TEMPLATE_EXPORT
2424 #define QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER(TypeName, Id, Name) \
2425 extern template class QT_METATYPE_TEMPLATE_EXPORT QMetaTypeForType<Name>;
2434 #undef QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER
2435 #undef QT_METATYPE_TEMPLATE_EXPORT
2438 template<
typename T>
2441 using Ty = std::remove_cv_t<std::remove_reference_t<T>>;
2446 template<
typename T,
typename ODR_VIOLATION_PREVENTER>
2449 template<
typename U>
2450 static auto check(
U *) -> std::integral_constant<bool,
sizeof(
U) != 0>;
2451 static auto check(...) -> std::false_type;
2452 using type = decltype(check(
static_cast<T *
>(
nullptr)));
2456 template <
typename T,
typename ODR_VIOLATION_PREVENTER>
2459 template<
typename T>
2462 using type = std::remove_pointer_t<T>;
2465 #define Q_REMOVE_POINTER_LIKE_IMPL(Pointer) \
2466 template <typename T> \
2467 struct qRemovePointerLike<Pointer<T>> \
2473 template<
typename T>
2475 #undef Q_REMOVE_POINTER_LIKE_IMPL
2477 template<
typename T,
typename ForceComplete_>
2484 template<
typename Unique,
typename TypeCompletePair>
2488 using ForceComplete =
typename TypeCompletePair::ForceComplete;
2489 using Ty = std::remove_cv_t<std::remove_reference_t<T>>;
2500 template<
typename T>
2503 return QMetaType(QtPrivate::qMetaTypeInterfaceForType<T>());
2508 return d_ptr ? d_ptr->size : 0;
2513 return d_ptr ? d_ptr->alignment : 0;
2518 return d_ptr ? TypeFlags(d_ptr->flags) : TypeFlags{};
2523 return d_ptr && d_ptr->metaObjectFn ? d_ptr->metaObjectFn(d_ptr) :
nullptr;
2526 template<
typename...
T>
2528 QtPrivate::qMetaTypeInterfaceForType<T>()...
2533 return d_ptr ? d_ptr->name :
nullptr;
2536 template<
typename Unique,
typename...
T>
2538 QtPrivate::qTryMetaTypeInterfaceForType<Unique, T>()...
2544 QPairVariantInterfaceImpl, Q_CORE_EXPORT)
small capitals from c petite p scientific i
[1]
T loadAcquire() const noexcept
void storeRelease(T newValue) noexcept
The QBitArray class provides an array of bits.
The QBitmap class provides monochrome (1-bit depth) pixmaps.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QByteArray class provides an array of bytes.
const char * constData() const noexcept
The QByteArrayList class provides a list of byte arrays.
The QCborArray class is used to hold an array of CBOR elements.
The QCborMap class is used to hold an associative container representable in CBOR.
The QCborValue class encapsulates a value in CBOR.
The QChar class provides a 16-bit Unicode character.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QColorSpace class provides a color space abstraction.
The QCursor class provides a mouse cursor with an arbitrary shape.
The QDataStream class provides serialization of binary data to a QIODevice.
The QDate class provides date functions.
The QDateTime class provides date and time functions.
The QDebug class provides an output stream for debugging information.
The QEasingCurve class provides easing curves for controlling animation.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
The QFont class specifies a query for a font used for drawing text.
The QIcon class provides scalable icons in different modes and states.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QJsonArray class encapsulates a JSON array.
The QJsonDocument class provides a way to read and write JSON documents.
The QJsonObject class encapsulates a JSON object.
The QJsonValue class encapsulates a value in JSON.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QLineF class provides a two-dimensional vector using floating point precision.
The QLine class provides a two-dimensional vector using integer precision.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
The QModelIndex class is used to locate data in a data model.
The QObject class is the base class of all Qt objects.
The QPalette class contains color groups for each widget state.
static const QPartialOrdering Less
static const QPartialOrdering Equivalent
static const QPartialOrdering Unordered
The QPen class defines how a QPainter should draw lines and outlines of shapes.
The QPersistentModelIndex class is used to locate data in a data model.
The QPixmap class is an off-screen image representation that can be used as a paint device.
The QPointF class defines a point in the plane using floating point precision.
The QPoint class defines a point in the plane using integer precision.
The QPointer class is a template class that provides guarded pointers to QObject.
The QPolygonF class provides a list of points using floating point precision. \inmodule QtGui.
The QPolygon class provides a list of points using integer precision. \inmodule QtGui.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
The QRegion class specifies a clip region for a painter.
The QRegularExpression class provides pattern matching using regular expressions.
The QSharedPointer class holds a strong reference to a shared pointer.
The QSizeF class defines the size of a two-dimensional object using floating point precision.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
The QTextFormat class provides formatting information for a QTextDocument. \inmodule QtGui.
The QTextLength class encapsulates the different types of length used in a QTextDocument....
The QTime class provides clock time functions.
The QUrl class provides a convenient interface for working with URLs.
The QUuid class stores a Universally Unique Identifier (UUID).
The QVariant class acts like a union for the most common Qt data types.
The QVector2D class represents a vector or vertex in 2D space.
The QVector3D class represents a vector or vertex in 3D space.
The QVector4D class represents a vector or vertex in 4D space.
The QWeakPointer class holds a weak reference to a shared pointer.
QMap< QString, QString > map
[6]
list append(new Employee("Blackpool", "Stephen"))
bool is_ident_char(char s)
auto it unsigned count const
const wchar_t * getName(QSslKeyPrivate::Cipher cipher)
typename qRemovePointerLike< T >::type qRemovePointerLike_t
constexpr auto typenameHelper()
constexpr bool IsQmlListType
constexpr int qNormalizeType(const char *begin, const char *end, char *output)
constexpr const QMetaTypeInterface * qTryMetaTypeInterfaceForType()
constexpr bool IsUnsignedEnum
constexpr const QMetaTypeInterface * qMetaTypeInterfaceForType()
constexpr bool IsUnsignedEnum< T, true >
To convertImplicit(const From &from)
QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Wattributes") QT_WARNING_POP template< typename T > const expr const QMetaTypeInterface *qMetaTypeInterfaceForType()
char qt_getEnumMetaObject(const T &)
PCRE2_SIZE PRIV() strlen(PCRE2_SPTR str)
#define Q_BASIC_ATOMIC_INITIALIZER(a)
#define Q_DECL_ENUMERATOR_DEPRECATED_X(x)
#define QT_WARNING_DISABLE_FLOAT_COMPARE
QPair< QVariant, QVariant > QVariantPair
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
QT_END_INCLUDE_NAMESPACE typedef double qreal
#define QT_DEPRECATED_VERSION_6_0
QT_BEGIN_NAMESPACE typedef signed char qint8
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define Q_ASSERT_X(cond, x, msg)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
int QT_PREPEND_NAMESPACE(QSharedMemoryPrivate)
QT_BEGIN_NAMESPACE typedef char Char
HB_EXTERN hb_font_get_glyph_func_t void hb_destroy_func_t destroy
obj metaObject() -> className()
static T * internalData(const QWeakPointer< T > &p) noexcept
static char checkType(void(X::*)())
static void * checkType(void(T::*)())
static bool registerConverter()
static char checkType(void(X::*)())
static void * checkType(void(T::*)())
static no_type checkType(...)
static yes_type checkType(QObject *)
static yes_type checkType(const QObject *)
static const T & declval()
QIterable< QMetaAssociation > operator()(const From &f) const
QIterable< QMetaAssociation > operator()(From &f) const
static void dataStreamIn(const QMetaTypeInterface *, QDataStream &ds, void *a)
static void dataStreamOut(const QMetaTypeInterface *, QDataStream &ds, const void *a)
static void debugStream(const QMetaTypeInterface *, QDebug &dbg, const void *a)
QT_WARNING_PUSH static QT_WARNING_DISABLE_FLOAT_COMPARE bool equals(const QMetaTypeInterface *, const void *a, const void *b)
static bool lessThan(const QMetaTypeInterface *, const void *a, const void *b)
QIterable< QMetaSequence > operator()(const From &f) const
QIterable< QMetaSequence > operator()(From &f) const
QObject * operator()(const QWeakPointer< T > &p) const
QObject * operator()(const SmartPointer &p) const
constexpr int normalizeType(const char *begin, const char *end, bool adjustConst=true)
constexpr int normalizeTypeFromSignature(const char *begin, const char *end)
ForceComplete_ ForceComplete
static auto check(...) -> std::false_type
static auto check(U *) -> std::integral_constant< bool, sizeof(U) !=0 >
decltype(check(static_cast< T * >(nullptr))) type
std::remove_pointer_t< T > type
void compare(Input input, FnUnderTest fn_under_test, const QByteArray &output)