summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-12 08:03:57 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-17 00:20:47 (GMT)
commit3799ecd97312ab0f5a8dc5e6aef4227cef36813a (patch)
tree5c5ea3386fca10e47794dce79e842414caf7b6a4 /src
parent4613955f735837d8007f5558db6a07ec5efb9ab5 (diff)
downloadQt-3799ecd97312ab0f5a8dc5e6aef4227cef36813a.zip
Qt-3799ecd97312ab0f5a8dc5e6aef4227cef36813a.tar.gz
Qt-3799ecd97312ab0f5a8dc5e6aef4227cef36813a.tar.bz2
Simplify QDeclarativeComponent::creationContext() logic
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index d3608c4..07cdd6d 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -405,11 +405,8 @@ QDeclarativeContext *QDeclarativeComponent::creationContext() const
Q_D(const QDeclarativeComponent);
if(d->creationContext)
return d->creationContext;
- QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(this);
- if (ddata)
- return ddata->context;
- else
- return 0;
+
+ return qmlContext(this);
}
/*!