summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfile.cpp6
-rw-r--r--src/corelib/statemachine/qabstractstate.cpp3
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp6
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);
}
/*!