From 5bc35276fb38385af4f1cd6b1a9ea7195a1d0d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 15 Nov 2011 13:49:52 +0100 Subject: Hide QVariant helper classes in a namespace. Moving these classes to an unnamed namespace reduced chances of a name conflict and size of executable. GCC 4.6 in release mode produces a 5kB smaller binary. Change-Id: Ie1819a88180f9db1cd32cc59ea6fe268ecbd5813 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qvariant.cpp | 2 ++ src/gui/kernel/qguivariant.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 894ebcbb80..0afeaa02d6 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -73,6 +73,7 @@ QT_BEGIN_NAMESPACE # define FLT_DIG 6 #endif +namespace { template struct TypeDefiniton { static const bool IsAvailable = true; @@ -99,6 +100,7 @@ struct CoreTypesFilter { static const bool IsAccepted = QTypeModuleInfo::IsCore && TypeDefiniton::IsAvailable; }; }; +} // namspace static void construct(QVariant::Private *x, const void *copy) { diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index 78d431f9bd..f0baf7064c 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -98,6 +98,7 @@ Q_GUI_EXPORT const QVariant::Handler *qt_widgets_variant_handler = 0; Q_CORE_EXPORT const QVariant::Handler *qcoreVariantHandler(); +namespace { template struct TypeDefiniton { static const bool IsAvailable = true; @@ -141,6 +142,7 @@ struct CoreAndGuiTypesFilter { static const bool IsAccepted = (QTypeModuleInfo::IsCore || QTypeModuleInfo::IsGui) && TypeDefiniton::IsAvailable; }; }; +} // namespace static void construct(QVariant::Private *x, const void *copy) { -- cgit v1.2.3