summaryrefslogtreecommitdiffstats
path: root/src/widgets/statemachine
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2011-11-28 15:40:35 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-01 14:35:42 +0100
commite650859dc9c26b3d411c534286f477d786723a74 (patch)
treed06bb9f7b6623b45834ab1abb7281f84bf7745a8 /src/widgets/statemachine
parent389538c2e76698944834526a2f36284cce109afe (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/widgets/statemachine')
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp
index 7a498eb77f..f717662ace 100644
--- a/src/widgets/statemachine/qguistatemachine.cpp
+++ b/src/widgets/statemachine/qguistatemachine.cpp
@@ -474,18 +474,16 @@ const QStateMachinePrivate::Handler qt_gui_statemachine_handler = {
};
static const QStateMachinePrivate::Handler *qt_guistatemachine_last_handler = 0;
-int qRegisterGuiStateMachine()
+void qRegisterGuiStateMachine()
{
qt_guistatemachine_last_handler = QStateMachinePrivate::handler;
QStateMachinePrivate::handler = &qt_gui_statemachine_handler;
- return 1;
}
Q_CONSTRUCTOR_FUNCTION(qRegisterGuiStateMachine)
-int qUnregisterGuiStateMachine()
+void qUnregisterGuiStateMachine()
{
QStateMachinePrivate::handler = qt_guistatemachine_last_handler;
- return 1;
}
Q_DESTRUCTOR_FUNCTION(qUnregisterGuiStateMachine)