summaryrefslogtreecommitdiffstats
path: root/demos/declarative/minehunt/main.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
commit2790cb59f6877c1027c833578b72e168c912758a (patch)
treeb626316b5801ba887b48e9fe71f811f4cf4ec581 /demos/declarative/minehunt/main.cpp
parentf800919c4336da77b73561cc5180fc167f61f435 (diff)
downloadQt-2790cb59f6877c1027c833578b72e168c912758a.zip
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.gz
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.bz2
Make "on" syntax mandatory for value sources and interceptors
Where you would have written x: NumberAnimation {} y: Behavior {} you now must write NumberAnimation on x {} Behavior on y {} This change also makes the parser more strict with respect to multiple assignments to a single property - they're no longer allowed. For example this x: 10 x: 11 is now an error.
Diffstat (limited to 'demos/declarative/minehunt/main.cpp')
-rw-r--r--demos/declarative/minehunt/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp
index 0e99731..c8b4b54 100644
--- a/demos/declarative/minehunt/main.cpp
+++ b/demos/declarative/minehunt/main.cpp
@@ -100,8 +100,8 @@ public:
MyWidget(int = 370, int = 480, QWidget *parent=0, Qt::WindowFlags flags=0);
~MyWidget();
- Q_PROPERTY(QList<Tile *> *tiles READ tiles CONSTANT);
- QList<Tile *> *tiles() { return &_tiles; }
+ Q_PROPERTY(QDeclarativeListProperty<Tile> tiles READ tiles CONSTANT);
+ QDeclarativeListProperty<Tile> tiles() { return QDeclarativeListProperty<Tile>(this, _tiles); }
Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged);
bool isPlaying() {return playing;}
@@ -168,7 +168,6 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags
QDeclarativeContext *ctxt = canvas->rootContext();
ctxt->addDefaultObject(this);
- ctxt->setContextProperty("tiles", QVariant::fromValue<QList<Tile*>*>(&_tiles));//QTBUG-5675
canvas->setSource(QUrl::fromLocalFile(fileName));
}