summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-11 08:51:54 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-11 14:07:01 (GMT)
commit0f60b6e05a707630e02655c60ae60884262a4b8e (patch)
tree564982f5dc6a2266818e050b2576ef4f5e74eaf5 /src/corelib/statemachine
parentf0a4a37a5182660580fd361110d3fd51463221d8 (diff)
downloadQt-0f60b6e05a707630e02655c60ae60884262a4b8e.zip
Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.gz
Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.bz2
remove q->layout() and q->parentWidget() code where unnecessary
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r--src/corelib/statemachine/qabstractstate.cpp3
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp
index b9a50a2..973057b 100644
--- a/src/corelib/statemachine/qabstractstate.cpp
+++ b/src/corelib/statemachine/qabstractstate.cpp
@@ -89,8 +89,7 @@ QAbstractStatePrivate *QAbstractStatePrivate::get(QAbstractState *q)
QStateMachine *QAbstractStatePrivate::machine() const
{
- Q_Q(const QAbstractState);
- QObject *par = q->parent();
+ QObject *par = parent;
while (par != 0) {
if (QStateMachine *mach = qobject_cast<QStateMachine*>(par))
return mach;
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index f582b8c..c1b553c 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -113,8 +113,7 @@ QAbstractTransitionPrivate *QAbstractTransitionPrivate::get(QAbstractTransition
QStateMachine *QAbstractTransitionPrivate::machine() const
{
- Q_Q(const QAbstractTransition);
- QObject *par = q->parent();
+ QObject *par = parent;
while (par != 0) {
if (QStateMachine *mach = qobject_cast<QStateMachine*>(par))
return mach;
@@ -137,8 +136,7 @@ void QAbstractTransitionPrivate::callOnTransition(QEvent *e)
QState *QAbstractTransitionPrivate::sourceState() const
{
- Q_Q(const QAbstractTransition);
- return qobject_cast<QState*>(q->parent());
+ return qobject_cast<QState*>(parent);
}
/*!