summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-13 12:10:00 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-13 12:10:00 (GMT)
commit9878c1765332d9a68a8371b90888fe09e272c7a8 (patch)
treea67a7a28f6737b17498a76bcc40d5ffd65e81572 /src/declarative
parent7d805a6717692b540c02b8caace25a0b47c7f0d6 (diff)
parentb52da4ab2179079a6aff95891786d2f6598048b5 (diff)
downloadQt-9878c1765332d9a68a8371b90888fe09e272c7a8.zip
Qt-9878c1765332d9a68a8371b90888fe09e272c7a8.tar.gz
Qt-9878c1765332d9a68a8371b90888fe09e272c7a8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Conflicts: doc/src/examples/simpletreemodel.qdoc doc/src/examples/spinboxdelegate.qdoc doc/src/index.qdoc
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp6
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp13
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp7
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp2
5 files changed, 19 insertions, 13 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 2b41710..cc7c673 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2500,7 +2500,9 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
This property holds whether clipping is enabled.
if clipping is enabled, an item will clip its own painting, as well
- as the painting of its children, to its bounding rectangle.
+ as the painting of its children, to its bounding rectangle. If you set
+ clipping during an item's paint operation, remember to re-set it to
+ prevent clipping the rest of your scene.
Non-rectangular clipping regions are not supported for performance reasons.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 2b268fb..68e7e9a 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -133,13 +133,13 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
create items as they are required.
Also, note that Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects.
- For example, it cannot be used to repeat QtObjects:
+ For example, it cannot be used to repeat QObjects:
\badcode
Item {
- //XXX does not work! Can't repeat QtObject as it doesn't derive from Item.
+ //XXX does not work! Can't repeat QObject as it doesn't derive from Item.
Repeater {
model: 10
- QtObject {}
+ QObject {}
}
}
\endcode
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 3d25291..a58dc6c 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -80,10 +80,12 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
\code
QDeclarativeEngine engine;
+ QStringListModel modelData;
QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext());
- context->setContextProperty("myModel", modelData);
+ context->setContextProperty("myModel", &modelData);
- QDeclarativeComponent component(&engine, "ListView { model=myModel }");
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.7\nListView { model: myModel }", QUrl());
component.create(context);
\endcode
@@ -104,12 +106,13 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
...
};
- MyDataSet *myDataSet = new MyDataSet;
+ MyDataSet myDataSet;
QDeclarativeEngine engine;
QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext());
- context->setContextObject(myDataSet);
+ context->setContextObject(&myDataSet);
- QDeclarativeComponent component(&engine, "ListView { model=myModel }");
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.7\nListView { model: myModel }", QUrl());
component.create(context);
\endcode
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index a476629..8aab4c2 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -184,11 +184,12 @@ void QDeclarativeEnginePrivate::defineModule()
}
/*!
-\keyword QmlGlobalQtObject
-\qmlclass Qt QDeclarativeEnginePrivate
+\qmlclass QML:Qt QDeclarativeEnginePrivate
\brief The QML global Qt object provides useful enums and functions from Qt.
-The \c Qt object provides useful enums and functions from Qt, for use in all QML files.
+\keyword QmlGlobalQtObject
+
+\brief The \c Qt object provides useful enums and functions from Qt, for use in all QML files.
The \c Qt object is not a QML element; it cannot be instantiated. It is a global object
with enums and functions. To use it, call the members of the global \c Qt object directly.
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 9ced14f..de2de21 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -525,6 +525,7 @@ void QDeclarativePixmapReader::cancel(QDeclarativePixmapReply *reply)
mutex.lock();
if (reply->loading) {
cancelled.append(reply);
+ reply->data = 0;
// XXX
if (threadObject) threadObject->processJobs();
} else {
@@ -738,7 +739,6 @@ void QDeclarativePixmapData::release()
if (refCount == 0) {
if (reply) {
- reply->data = 0;
reply->reader->cancel(reply);
reply = 0;
}