aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-10-30 22:30:01 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-10-31 15:42:42 +0100
commit0704d2be63b484cb579c1507223db3f914b1338a (patch)
tree66d4e616545d7f576125e85cc108c7e2988cecdd /src/qml/qml/qqmlcomponent.cpp
parente67948823d6810c2de784859da52a261bf80b550 (diff)
Get rid of !this and similar constructs
The C++ standard doesn't allow calling member functions on a mull object. Fix all such places, by moving the checks to the caller where required. Change-Id: I10fb22acaf0324d8ffd3a6d8e19152e5d32f56bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index c772e16ca9..63a43966b1 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1500,13 +1500,13 @@ void QmlIncubatorObject::setInitialState(QObject *o)
void QmlIncubatorObject::destroy(Managed *that)
{
- that->as<QmlIncubatorObject>()->d()->~Data();
+ static_cast<QmlIncubatorObject *>(that)->d()->~Data();
}
void QmlIncubatorObject::markObjects(QV4::Managed *that, QV4::ExecutionEngine *e)
{
- QmlIncubatorObject *o = that->as<QmlIncubatorObject>();
- Q_ASSERT(o);
+ QmlIncubatorObject *o = static_cast<QmlIncubatorObject *>(that);
+ Q_ASSERT(that->as<QmlIncubatorObject>());
o->d()->valuemap.mark(e);
o->d()->qmlGlobal.mark(e);
o->d()->statusChanged.mark(e);