diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2011-11-28 15:40:35 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-01 14:35:42 +0100 |
commit | e650859dc9c26b3d411c534286f477d786723a74 (patch) | |
tree | d06bb9f7b6623b45834ab1abb7281f84bf7745a8 /src/gui/kernel/qguivariant.cpp | |
parent | 389538c2e76698944834526a2f36284cce109afe (diff) |
Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.
By adding anonymous namespace and static linkage we are reducing
visibility of implementation of these macros.
This patch also fixes warning about a declared but unused variable which
was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION.
Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/gui/kernel/qguivariant.cpp')
-rw-r--r-- | src/gui/kernel/qguivariant.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index 9198e7f119..3b60f29e83 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -486,20 +486,18 @@ static const QMetaTypeInterface qVariantGuiHelper[] = { #undef QT_IMPL_METATYPEINTERFACE_GUI_TYPES static const QVariant::Handler *qt_guivariant_last_handler = 0; -int qRegisterGuiVariant() +void qRegisterGuiVariant() { qt_guivariant_last_handler = QVariant::handler; QVariant::handler = &qt_gui_variant_handler; qMetaTypeGuiHelper = qVariantGuiHelper; - return 1; } Q_CONSTRUCTOR_FUNCTION(qRegisterGuiVariant) -int qUnregisterGuiVariant() +void qUnregisterGuiVariant() { QVariant::handler = qt_guivariant_last_handler; qMetaTypeGuiHelper = 0; - return 1; } Q_DESTRUCTOR_FUNCTION(qUnregisterGuiVariant) |