From f783ec5347ac9962d011b2ff470082e083216367 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Feb 2012 22:18:26 +0100 Subject: Remove use of Q_BROKEN_DEBUG_STREAM. No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qvariant_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel/qvariant_p.h') diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index cdae8997a7..c428d81bb4 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -410,7 +410,7 @@ Q_CORE_EXPORT void registerHandler(const int /* Modules::Names */ name, const QV Q_CORE_EXPORT void unregisterHandler(const int /* Modules::Names */ name); } -#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM) +#if !defined(QT_NO_DEBUG_STREAM) template class QVariantDebugStream { -- cgit v1.2.3 From 60c6ed0e042fa18d76d4961d394b8f99226e9892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 13 Feb 2012 13:06:40 +0100 Subject: Rename QMetaTypeSwitcher::UnknownType to NotBuiltinType. UnknownType suggest that a type is unknown to QMetaType, but QMetaTypeSwitcher is not checking for custom types. Change-Id: I6b8b692e0f20bed286c713672b35fb15757d389e Reviewed-by: Olivier Goffart --- src/corelib/kernel/qvariant_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/kernel/qvariant_p.h') diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index c428d81bb4..708a427860 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -345,7 +345,7 @@ public: FilteredConstructor(*this); } - void delegate(const QMetaTypeSwitcher::UnknownType*) + void delegate(const QMetaTypeSwitcher::NotBuiltinType*) { qWarning("Trying to construct an instance of an invalid type, type id: %i", m_x->type); m_x->type = QVariant::Invalid; @@ -395,7 +395,7 @@ public: FilteredDestructor cleaner(m_d); } - void delegate(const QMetaTypeSwitcher::UnknownType*) + void delegate(const QMetaTypeSwitcher::NotBuiltinType*) { qWarning("Trying to destruct an instance of an invalid type, type id: %i", m_d->type); } @@ -441,7 +441,7 @@ public: Filtered streamIt(m_debugStream, m_d); } - void delegate(const QMetaTypeSwitcher::UnknownType*) + void delegate(const QMetaTypeSwitcher::NotBuiltinType*) { qWarning("Trying to stream an instance of an invalid type, type id: %i", m_d->type); } -- cgit v1.2.3 From 6df396286a3221d12e810c0aaa71c4aa68db3331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Fri, 24 Feb 2012 14:27:01 +0100 Subject: Simplify QMetaTypeSwitcher. We do not need to distinguish between different types in the switcher. Before this patch it was not possible to overload DelegateObject::delegate with a pointer type. Now it is fixed. Change-Id: Icd73a53e73e5e66b1b6f6407ba4e0f79e584d930 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qvariant_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/kernel/qvariant_p.h') diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index 708a427860..a754bc4363 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -188,7 +188,7 @@ public: } bool delegate(const void*) { return true; } - + bool delegate(const QMetaTypeSwitcher::NotBuiltinType*) { return false; } protected: const QVariant::Private *m_a; const QVariant::Private *m_b; @@ -282,6 +282,7 @@ public: } // we need that as sizof(void) is undefined and it is needed in HasIsNullMethod bool delegate(const void *) { return m_d->is_null; } + bool delegate(const QMetaTypeSwitcher::NotBuiltinType *) { return m_d->is_null; } protected: const QVariant::Private *m_d; }; -- cgit v1.2.3