diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-31 09:28:34 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-31 09:33:36 (GMT) |
commit | 8a0a59e6776e1384f884e0f6e7ec6fe10f3be054 (patch) | |
tree | 2c6051889e80cae2cd4c14cf15e1c625dfb333e1 /src/corelib/statemachine | |
parent | 1a7286691a74016a0577073275fc462aea2fe1bc (diff) | |
download | Qt-8a0a59e6776e1384f884e0f6e7ec6fe10f3be054.zip Qt-8a0a59e6776e1384f884e0f6e7ec6fe10f3be054.tar.gz Qt-8a0a59e6776e1384f884e0f6e7ec6fe10f3be054.tar.bz2 |
remove const from QSignalEvent::sender*
QObject::sender() does not return const QObject*, so neither should
this API; it just forces you to const_cast for no good reason.
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r-- | src/corelib/statemachine/qsignalevent.h | 6 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 4 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine_p.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h index c09c5a3..b7ca61f 100644 --- a/src/corelib/statemachine/qsignalevent.h +++ b/src/corelib/statemachine/qsignalevent.h @@ -58,16 +58,16 @@ QT_MODULE(Core) class Q_CORE_EXPORT QSignalEvent : public QEvent { public: - QSignalEvent(const QObject *sender, int signalIndex, + QSignalEvent(QObject *sender, int signalIndex, const QList<QVariant> &arguments); ~QSignalEvent(); - inline const QObject *sender() const { return m_sender; } + inline QObject *sender() const { return m_sender; } inline int signalIndex() const { return m_signalIndex; } inline QList<QVariant> arguments() const { return m_arguments; } private: - const QObject *m_sender; + QObject *m_sender; int m_signalIndex; QList<QVariant> m_arguments; }; diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index a02480b..d89ad98 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1446,7 +1446,7 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio } #endif -void QStateMachinePrivate::handleTransitionSignal(const QObject *sender, int signalIndex, +void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalIndex, void **argv) { Q_ASSERT(connections[sender].at(signalIndex) != 0); @@ -2026,7 +2026,7 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent) Constructs a new QSignalEvent object with the given \a sender, \a signalIndex and \a arguments. */ -QSignalEvent::QSignalEvent(const QObject *sender, int signalIndex, +QSignalEvent::QSignalEvent(QObject *sender, int signalIndex, const QList<QVariant> &arguments) : QEvent(QEvent::Signal), m_sender(sender), m_signalIndex(signalIndex), m_arguments(arguments) diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index cae21aa..590cffe 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -147,7 +147,7 @@ public: #endif void unregisterTransition(QAbstractTransition *transition); void unregisterAllTransitions(); - void handleTransitionSignal(const QObject *sender, int signalIndex, + void handleTransitionSignal(QObject *sender, int signalIndex, void **args); void scheduleProcess(); |