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 <ogoffart@woboq.com>bb10
parent
202127f860
commit
5bc35276fb
|
|
@ -73,6 +73,7 @@ QT_BEGIN_NAMESPACE
|
|||
# define FLT_DIG 6
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
template<typename T>
|
||||
struct TypeDefiniton {
|
||||
static const bool IsAvailable = true;
|
||||
|
|
@ -99,6 +100,7 @@ struct CoreTypesFilter {
|
|||
static const bool IsAccepted = QTypeModuleInfo<T>::IsCore && TypeDefiniton<T>::IsAvailable;
|
||||
};
|
||||
};
|
||||
} // namspace
|
||||
|
||||
static void construct(QVariant::Private *x, const void *copy)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ Q_GUI_EXPORT const QVariant::Handler *qt_widgets_variant_handler = 0;
|
|||
|
||||
Q_CORE_EXPORT const QVariant::Handler *qcoreVariantHandler();
|
||||
|
||||
namespace {
|
||||
template<typename T>
|
||||
struct TypeDefiniton {
|
||||
static const bool IsAvailable = true;
|
||||
|
|
@ -141,6 +142,7 @@ struct CoreAndGuiTypesFilter {
|
|||
static const bool IsAccepted = (QTypeModuleInfo<T>::IsCore || QTypeModuleInfo<T>::IsGui) && TypeDefiniton<T>::IsAvailable;
|
||||
};
|
||||
};
|
||||
} // namespace
|
||||
|
||||
static void construct(QVariant::Private *x, const void *copy)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue