From 4b8ceb41aed352f10d36db5284453f425dbc5f3f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 30 Dec 2011 12:00:09 +0100 Subject: Store the is-a QObject fact with the metatype declaration. This is a source incompatible change for Q_DECLARE_METATYPE(T*), which now requires T to be fully defined. The consequences of this are: * Forward declared types can no longer be declared as a metatype. (though this is a very uncommon thing to do). There is a trivial workaround where necessary. Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8 Reviewed-by: Lars Knoll --- tests/benchmarks/corelib/tools/qstring/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/benchmarks/corelib/tools') diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index be2abe5c51..5ab53e3394 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1298,6 +1298,11 @@ static int ucstrncmp_ssse3_aligning2(const ushort *a, const ushort *b, int len) #endif typedef int (* UcstrncmpFunction)(const ushort *, const ushort *, int); +QT_BEGIN_NAMESPACE namespace QtPrivate { +template <> struct IsPointerToTypeDerivedFromQObject { + enum { Value = false }; +}; +} QT_END_NAMESPACE Q_DECLARE_METATYPE(UcstrncmpFunction) void tst_QString::ucstrncmp_data() const @@ -1457,6 +1462,11 @@ void tst_QString::fromLatin1() const } typedef void (* FromLatin1Function)(ushort *, const char *, int); +QT_BEGIN_NAMESPACE namespace QtPrivate { +template <> struct IsPointerToTypeDerivedFromQObject { + enum { Value = false }; +}; +} QT_END_NAMESPACE Q_DECLARE_METATYPE(FromLatin1Function) void fromLatin1_regular(ushort *dst, const char *str, int size) @@ -1907,6 +1917,11 @@ void tst_QString::fromLatin1Alternatives() const } typedef int (* FromUtf8Function)(ushort *, const char *, int); +QT_BEGIN_NAMESPACE namespace QtPrivate { +template <> struct IsPointerToTypeDerivedFromQObject { + enum { Value = false }; +}; +} QT_END_NAMESPACE Q_DECLARE_METATYPE(FromUtf8Function) extern QTextCodec::ConverterState *state; -- cgit v1.2.3