diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 08:51:54 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 14:07:01 (GMT) |
commit | 0f60b6e05a707630e02655c60ae60884262a4b8e (patch) | |
tree | 564982f5dc6a2266818e050b2576ef4f5e74eaf5 /src/corelib | |
parent | f0a4a37a5182660580fd361110d3fd51463221d8 (diff) | |
download | Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.zip Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.gz Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.bz2 |
remove q->layout() and q->parentWidget() code where unnecessary
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qfile.cpp | 6 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstractstate.cpp | 3 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstracttransition.cpp | 6 |
3 files changed, 5 insertions, 10 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 4deaddb..bfb1aae 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -154,17 +154,15 @@ QFilePrivate::setError(QFile::FileError err) void QFilePrivate::setError(QFile::FileError err, const QString &errStr) { - Q_Q(QFile); error = err; - q->setErrorString(errStr); + errorString = errStr; } void QFilePrivate::setError(QFile::FileError err, int errNum) { - Q_Q(QFile); error = err; - q->setErrorString(qt_error_string(errNum)); + errorString = qt_error_string(errNum); } //************* QFile 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); } /*! |