summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeloader.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-17 13:44:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-17 13:44:16 (GMT)
commitb3cddbcf92a20585fd6fcd0a6c200c5e94b8669f (patch)
treee476d17d94feb127f6e34fa46cfde4b763d50f77 /src/declarative/graphicsitems/qdeclarativeloader.cpp
parent4c1f54097a1fb1acff817ba8caa8af347ae56cd2 (diff)
parentca8231566ac3804e479502d082871ab8ca28b8bb (diff)
downloadQt-b3cddbcf92a20585fd6fcd0a6c200c5e94b8669f.zip
Qt-b3cddbcf92a20585fd6fcd0a6c200c5e94b8669f.tar.gz
Qt-b3cddbcf92a20585fd6fcd0a6c200c5e94b8669f.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (132 commits) Fix auto test Fix type lookup with url Fix default values on Textinput Add an implicit import "." to types loaded from a local url Fix crash Don't use Qt3 support methods. Crash Add/delete albums in photoviewer. Emits itemsRemoved() in QDeclarativeListModel::remove. Readd the itemtree benchmarks for comparison purposes. Allow enum constants as list element properties. Compile Cleanup benchmark a little Really fix warning. Fix warnings. MouseArea works now with any QGraphicsObject Make states test work with smaller font size. Register QGraphicsWidget type. Add ListView and GridView.indexAt() methods to get the index at a point. Tests for default count(), get() values should be run on the worker ...
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeloader.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index b0499d7..6dbcd16 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -155,6 +155,8 @@ void QDeclarativeLoaderPrivate::initResize()
QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeLoaderPrivate), parent)
{
+ Q_D(QDeclarativeItem);
+ d->flags |= QGraphicsItem::ItemIsFocusScope;
}
/*!
@@ -273,7 +275,7 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
if (component) {
QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(q));
- ctxt->addDefaultObject(q);
+ ctxt->setContextObject(q);
if (!component->errors().isEmpty()) {
qWarning() << component->errors();
@@ -346,12 +348,13 @@ QDeclarativeLoader::Status QDeclarativeLoader::status() const
}
/*!
- \qmlproperty real Loader::progress
+\qmlproperty real Loader::progress
- This property holds the progress of QML data loading, from 0.0 (nothing loaded)
- to 1.0 (finished).
+This property holds the progress of loading QML data from the network, from
+0.0 (nothing loaded) to 1.0 (finished). Most QML files are quite small, so
+this value will rapidly change from 0 to 1.
- \sa status
+\sa status
*/
qreal QDeclarativeLoader::progress() const
{