summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-22 19:20:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-22 19:20:19 (GMT)
commit74c6d263bebd0a3d74d0ca751985589c556c6c9b (patch)
tree2ab0c98c4e970c5c5988ce19d4cfb178d414a916
parent4894e6dd57c31e0196c6fdae4d1b2fb16b9f1b16 (diff)
parent0b6fd8966972616232054c5194243c52ca360bf8 (diff)
downloadQt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.zip
Qt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.tar.gz
Qt-74c6d263bebd0a3d74d0ca751985589c556c6c9b.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: (135 commits) Do not treat images in qml examples differently. Replace Flickable overshoot property with boundsBehavior Autotests and doc Give error on attempt to import types from too-early version number. Remove (undocumented) QML bindings for effects. De-straighten them lines. Doc: fix QStringList model doc (really). Doc: fix QStringList model docs Change return type to match value(). Add duration and easing properties to AnchorAnimation. Autotest Remove dead code Compile on Windows (export decl fix). Fix versioning of Qt Declarative's in-built types Fixed declarative/parserstress autotest. Fix parsing of regular expression literals. Fill out QGraphicsLayout bindings Update test files to new syntax Compile without Qt3 support. Ensure workerscript.qml works (autotested). ...
-rw-r--r--demos/declarative/calculator/calculator.qmlproject16
-rw-r--r--demos/declarative/demos.qmlproject16
-rw-r--r--demos/declarative/flickr/common/LikeOMeter.qml35
-rw-r--r--demos/declarative/flickr/common/Loading.qml8
-rw-r--r--demos/declarative/flickr/common/RssModel.qml7
-rw-r--r--demos/declarative/flickr/common/Star.qml45
-rw-r--r--demos/declarative/flickr/common/pics/background.pngbin60504 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.pngbin571 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.sci5
-rw-r--r--demos/declarative/flickr/common/pics/button.pngbin564 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button.sci5
-rw-r--r--demos/declarative/flickr/common/pics/ghns_star.pngbin891 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/loading.pngbin813 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/reflection.pngbin4839 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-bottom.pngbin656 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-corner.pngbin405 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right-screen.pngbin227 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right.pngbin635 -> 0 bytes
-rw-r--r--demos/declarative/flickr/flickr.qml4
-rw-r--r--demos/declarative/flickr/flickr.qmlproject16
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml1
-rw-r--r--demos/declarative/minehunt/minehunt.cpp2
-rw-r--r--demos/declarative/minehunt/minehunt.qmlproject16
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml6
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/Button.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml2
-rw-r--r--demos/declarative/photoviewer/photoviewer.qmlproject16
-rw-r--r--demos/declarative/samegame/SamegameCore/BoomBlock.qml10
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml4
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml2
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js2
-rw-r--r--demos/declarative/samegame/samegame.qml2
-rw-r--r--demos/declarative/samegame/samegame.qmlproject16
-rw-r--r--demos/declarative/snake/content/snake.js4
-rw-r--r--demos/declarative/snake/snake.qmlproject16
-rw-r--r--demos/declarative/twitter/twitter.qmlproject16
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml4
-rw-r--r--demos/declarative/webbrowser/webbrowser.qmlproject16
-rw-r--r--doc/src/declarative/advtutorial.qdoc22
-rw-r--r--doc/src/declarative/codingconventions.qdoc1
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/elements.qdoc7
-rw-r--r--doc/src/declarative/examples.qdoc39
-rw-r--r--doc/src/declarative/extending-examples.qdoc5
-rw-r--r--doc/src/declarative/extending.qdoc86
-rw-r--r--doc/src/declarative/globalobject.qdoc91
-rw-r--r--doc/src/declarative/integrating.qdoc3
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc20
-rw-r--r--doc/src/declarative/network.qdoc6
-rw-r--r--doc/src/declarative/propertybinding.qdoc56
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc14
-rw-r--r--doc/src/declarative/qdeclarativereference.qdoc4
-rw-r--r--doc/src/declarative/qdeclarativesecurity.qdoc4
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc65
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h3
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h3
-rw-r--r--doc/src/examples/qml-calculator.qdoc49
-rw-r--r--doc/src/examples/qml-flickr.qdoc49
-rw-r--r--doc/src/examples/qml-focus.qdoc49
-rw-r--r--doc/src/examples/qml-minehunt.qdoc49
-rw-r--r--doc/src/examples/qml-photoviewer.qdoc49
-rw-r--r--doc/src/examples/qml-samegame.qdoc49
-rw-r--r--doc/src/examples/qml-snake.qdoc49
-rw-r--r--doc/src/getting-started/examples.qdoc16
-rw-r--r--doc/src/images/declarative-examples.pngbin0 -> 39074 bytes
-rw-r--r--doc/src/images/qml-calculator-example.pngbin0 -> 33956 bytes
-rw-r--r--doc/src/images/qml-flickr-example.pngbin0 -> 280730 bytes
-rw-r--r--doc/src/images/qml-focus-example.pngbin0 -> 26833 bytes
-rw-r--r--doc/src/images/qml-minehunt-example.pngbin0 -> 170648 bytes
-rw-r--r--doc/src/images/qml-photoviewer-example.pngbin0 -> 473306 bytes
-rw-r--r--doc/src/images/qml-samegame-example.pngbin0 -> 285415 bytes
-rw-r--r--doc/src/images/qml-snake-example.pngbin0 -> 105053 bytes
-rw-r--r--doc/src/snippets/declarative/script.js1
-rwxr-xr-xdoc/src/template/style/style.css15
-rw-r--r--examples/declarative/animations/animations.qmlproject16
-rw-r--r--examples/declarative/aspectratio/aspectratio.qmlproject16
-rw-r--r--examples/declarative/behaviors/behaviors.qmlproject16
-rw-r--r--examples/declarative/border-image/border-image.qmlproject16
-rw-r--r--examples/declarative/clocks/clocks.qmlproject16
-rw-r--r--examples/declarative/connections/connections.qmlproject16
-rw-r--r--examples/declarative/declarative.pro1
-rw-r--r--examples/declarative/dial/dial.qmlproject16
-rw-r--r--examples/declarative/dynamic/dynamic.qml37
-rw-r--r--examples/declarative/dynamic/dynamic.qmlproject16
-rw-r--r--examples/declarative/dynamic/qml/itemCreation.js2
-rw-r--r--examples/declarative/effects/effects.qml65
-rw-r--r--examples/declarative/effects/pic.pngbin12933 -> 0 bytes
-rw-r--r--examples/declarative/examples.qmlproject16
-rw-r--r--examples/declarative/extending/adding/example.qml2
-rw-r--r--examples/declarative/extending/adding/main.cpp3
-rw-r--r--examples/declarative/extending/adding/person.h13
-rw-r--r--examples/declarative/extending/attached/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/attached/birthdayparty.h20
-rw-r--r--examples/declarative/extending/attached/example.qml10
-rw-r--r--examples/declarative/extending/attached/main.cpp6
-rw-r--r--examples/declarative/extending/attached/person.h37
-rw-r--r--examples/declarative/extending/binding/binding.pro4
-rw-r--r--examples/declarative/extending/binding/birthdayparty.cpp18
-rw-r--r--examples/declarative/extending/binding/birthdayparty.h28
-rw-r--r--examples/declarative/extending/binding/example.qml6
-rw-r--r--examples/declarative/extending/binding/happybirthdaysong.cpp (renamed from examples/declarative/extending/binding/happybirthday.cpp)12
-rw-r--r--examples/declarative/extending/binding/happybirthdaysong.h (renamed from examples/declarative/extending/binding/happybirthday.h)17
-rw-r--r--examples/declarative/extending/binding/main.cpp10
-rw-r--r--examples/declarative/extending/binding/person.h37
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h15
-rw-r--r--examples/declarative/extending/coercion/example.qml4
-rw-r--r--examples/declarative/extending/coercion/main.cpp6
-rw-r--r--examples/declarative/extending/coercion/person.h26
-rw-r--r--examples/declarative/extending/default/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/default/birthdayparty.h17
-rw-r--r--examples/declarative/extending/default/example.qml4
-rw-r--r--examples/declarative/extending/default/main.cpp6
-rw-r--r--examples/declarative/extending/default/person.h23
-rw-r--r--examples/declarative/extending/extended/lineedit.cpp2
-rw-r--r--examples/declarative/extending/extended/lineedit.h10
-rw-r--r--examples/declarative/extending/extending.qmlproject16
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.h18
-rw-r--r--examples/declarative/extending/grouped/example.qml4
-rw-r--r--examples/declarative/extending/grouped/main.cpp6
-rw-r--r--examples/declarative/extending/grouped/person.h37
-rw-r--r--examples/declarative/extending/properties/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/properties/birthdayparty.h15
-rw-r--r--examples/declarative/extending/properties/example.qml4
-rw-r--r--examples/declarative/extending/properties/main.cpp4
-rw-r--r--examples/declarative/extending/properties/person.h11
-rw-r--r--examples/declarative/extending/signal/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/signal/birthdayparty.h21
-rw-r--r--examples/declarative/extending/signal/example.qml4
-rw-r--r--examples/declarative/extending/signal/main.cpp6
-rw-r--r--examples/declarative/extending/signal/person.h37
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.cpp14
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.h28
-rw-r--r--examples/declarative/extending/valuesource/example.qml6
-rw-r--r--examples/declarative/extending/valuesource/happybirthdaysong.cpp (renamed from examples/declarative/extending/valuesource/happybirthday.cpp)12
-rw-r--r--examples/declarative/extending/valuesource/happybirthdaysong.h (renamed from examples/declarative/extending/valuesource/happybirthday.h)16
-rw-r--r--examples/declarative/extending/valuesource/main.cpp10
-rw-r--r--examples/declarative/extending/valuesource/person.h37
-rw-r--r--examples/declarative/extending/valuesource/valuesource.pro4
-rw-r--r--examples/declarative/fillmode/content/QtLogo.qml30
-rw-r--r--examples/declarative/fillmode/content/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--examples/declarative/fillmode/face.pngbin905 -> 0 bytes
-rw-r--r--examples/declarative/fillmode/fillmode.qml52
-rw-r--r--examples/declarative/fillmode/fillmode.qmlproject16
-rw-r--r--examples/declarative/flipable/flipable.qmlproject16
-rw-r--r--examples/declarative/focus/Core/GridMenu.qml4
-rw-r--r--examples/declarative/focus/Core/ListViewDelegate.qml61
-rw-r--r--examples/declarative/focus/Core/ListViews.qml6
-rw-r--r--examples/declarative/focus/focus.qmlproject16
-rw-r--r--examples/declarative/fonts/fonts.qmlproject16
-rw-r--r--examples/declarative/gestures/gestures.qmlproject16
-rw-r--r--examples/declarative/gridview/gridview.qmlproject16
-rw-r--r--examples/declarative/imageprovider/imageprovider.qmlproject16
-rw-r--r--examples/declarative/images/images.qmlproject16
-rw-r--r--examples/declarative/layouts/layouts.qmlproject16
-rw-r--r--examples/declarative/listmodel-threaded/dataloader.js5
-rw-r--r--examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject16
-rw-r--r--examples/declarative/listmodel-threaded/timedisplay.qml3
-rw-r--r--examples/declarative/listview/listview.qmlproject16
-rw-r--r--examples/declarative/mousearea/mousearea.qmlproject16
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.qmlproject16
-rw-r--r--examples/declarative/package/package.qmlproject16
-rw-r--r--examples/declarative/parallax/parallax.qmlproject16
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml2
-rw-r--r--examples/declarative/plugins/README2
-rw-r--r--examples/declarative/plugins/plugins.pro1
-rw-r--r--examples/declarative/plugins/plugins.qmlproject16
-rw-r--r--examples/declarative/progressbar/progressbar.qmlproject16
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.cpp2
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.pro1
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.qmlproject16
-rw-r--r--examples/declarative/scrollbar/scrollbar.qmlproject16
-rw-r--r--examples/declarative/searchbox/searchbox.qmlproject16
-rw-r--r--examples/declarative/slideswitch/slideswitch.qmlproject16
-rw-r--r--examples/declarative/sql/sql.qmlproject16
-rw-r--r--examples/declarative/states/states.qmlproject16
-rw-r--r--examples/declarative/stringlistmodel/main.cpp76
-rw-r--r--examples/declarative/stringlistmodel/stringlistmodel.pro9
-rw-r--r--examples/declarative/stringlistmodel/stringlistmodel.qrc5
-rw-r--r--examples/declarative/stringlistmodel/view.qml15
-rw-r--r--examples/declarative/tabwidget/tabwidget.qmlproject16
-rw-r--r--examples/declarative/tic-tac-toe/content/pics/board.pngbin1423 -> 12258 bytes
-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject16
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Block.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.js2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml8
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml4
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml2
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml2
-rw-r--r--examples/declarative/tutorials/tutorials.qmlproject16
-rw-r--r--examples/declarative/tvtennis/tvtennis.qmlproject16
-rw-r--r--examples/declarative/velocity/velocity.qmlproject16
-rw-r--r--examples/declarative/webview/webview.qmlproject16
-rw-r--r--examples/declarative/workerscript/workerscript.qmlproject16
-rw-r--r--examples/declarative/xmldata/xmldata.qmlproject16
-rw-r--r--examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject16
-rw-r--r--src/declarative/QmlChanges.txt7
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp133
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p.h7
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp104
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h26
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects.cpp174
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp88
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h9
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp49
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp81
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp36
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp86
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp102
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp130
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp18
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp63
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h14
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp15
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p_p.h8
-rw-r--r--src/declarative/graphicsitems/qdeclarativescalegrid.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp103
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h9
-rw-r--r--src/declarative/qml/parser/qdeclarativejs.g2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsgrammar.cpp6
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp150
-rw-r--r--src/declarative/qml/qdeclarative.h14
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp11
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp9
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp146
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp12
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h3
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp1
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp50
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass.cpp8
-rw-r--r--src/declarative/qml/qdeclarativecustomparser.cpp20
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p.h4
-rw-r--r--src/declarative/qml/qdeclarativedata_p.h3
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp9
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp309
-rw-r--r--src/declarative/qml/qdeclarativeengine.h7
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h10
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp63
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp5
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp11
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp22
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.h2
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp124
-rw-r--r--src/declarative/qml/qdeclarativeinfo.h21
-rw-r--r--src/declarative/qml/qdeclarativeinstruction.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h1
-rw-r--r--src/declarative/qml/qdeclarativelist.cpp15
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp122
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h1
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp11
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp36
-rw-r--r--src/declarative/qml/qdeclarativeparser.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.cpp32
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h1
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp1
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.cpp6
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject.cpp14
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp100
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.cpp33
-rw-r--r--src/declarative/qml/qdeclarativetypenotavailable.cpp49
-rw-r--r--src/declarative/qml/qdeclarativetypenotavailable_p.h (renamed from src/declarative/graphicsitems/qdeclarativeeffects_p.h)42
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp10
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp7
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp27
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject_p.h1
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp2
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp78
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h12
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp9
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp5
-rw-r--r--src/declarative/util/qdeclarativelistmodelworkeragent.cpp5
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp4
-rw-r--r--src/declarative/util/qdeclarativepropertymap.cpp6
-rw-r--r--src/declarative/util/qdeclarativepropertymap.h2
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp4
-rw-r--r--src/declarative/util/qdeclarativesmoothedfollow.cpp4
-rw-r--r--src/declarative/util/qdeclarativespringfollow.cpp16
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/declarative/util/qdeclarativestate_p.h6
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp3
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp585
-rw-r--r--src/declarative/util/qdeclarativestateoperations_p.h54
-rw-r--r--src/declarative/util/qdeclarativetimer_p.h1
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager.cpp5
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp82
-rw-r--r--src/declarative/util/qdeclarativeview.cpp273
-rw-r--r--src/declarative/util/qdeclarativeview.h2
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h1
-rw-r--r--src/gui/widgets/qlinecontrol.cpp2
-rw-r--r--src/imports/gestures/gestures.pro3
-rw-r--r--src/imports/multimedia/multimedia.pro3
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp10
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp16
-rw-r--r--src/imports/particles/particles.pro3
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp14
-rw-r--r--src/imports/webkit/webkit.pro3
-rw-r--r--src/imports/widgets/graphicslayouts.cpp112
-rw-r--r--src/imports/widgets/graphicslayouts_p.h78
-rw-r--r--src/imports/widgets/widgets.cpp6
-rw-r--r--src/imports/widgets/widgets.pro3
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp4
-rw-r--r--src/s60installs/s60installs.pro19
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml9
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp29
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/anchors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/centerin.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/crash1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/fill.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/loop1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/loop2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/margins.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp50
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/attached.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/rotation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp14
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/binding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/color.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/empty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/loop.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/parent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/simple.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativebinding/data/test-binding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/trimming.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp93
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp46
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp47
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/MyComponent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/MyItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/import/Bar.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/top.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml17
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h31
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp151
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp86
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp32
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/crash.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml81
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test.qml4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test4.qml4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test5.qml4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp57
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/setindex.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/green.pngbin0 -> 314 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/tiling.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp57
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keystest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.7.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.8.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.9.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/crash2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/method.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.7.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h24
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp35
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/data/layouts.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml24
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/data/model.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp124
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/MyType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/displaylist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/itemlist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResize.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/VmeError.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/crash.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/nonItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp31
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/dragging.qml28
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml38
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp97
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/datamodel.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/displaypath.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathtest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview0.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/data/TestType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/atob.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/btoa.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponent.qml17
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml34
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/darker.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/enums.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/formatting.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/hsla.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/lighter.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/md5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/point.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/rect.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/rgba.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/size.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/tint.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/vector.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp132
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/objlist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/properties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml2
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicExtension.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deleting.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deletingState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/explicit.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalObj.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/legalTempState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/script.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp53
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/navigation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/masks.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/navigation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp17
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.h3
-rw-r--r--tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro7
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp272
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml11
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro11
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp111
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/elements.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/javaScript.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/loadError.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/newwindows.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/sethtml.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp4
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/itemlist.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/listview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/easing.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/loop.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.pngbin26099 -> 28886 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/fillmode.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml7
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.qml207
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml62
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.pngbin0 -> 1721 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.pngbin0 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.pngbin0 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.pngbin0 -> 1704 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.pngbin0 -> 1704 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.pngbin0 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.pngbin0 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.pngbin0 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml5127
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml52
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data/parentanchor.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/qt-669.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/wrap.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/rect/GradientRect.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/rect/MyRect.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/rect/rect-painting.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic1.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic2.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic3.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic4.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/egg.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/data/evaluateJavaScript.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/data/windowObjects.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/data/fontFamily.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/data/fontSize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/data/noAutoLoadImages.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/data/setFontFamily.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/data/pageWidth.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/data/renderControl.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/data/resolution.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/data/zoomTextOnly.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/data/zooming.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml2
-rw-r--r--tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp8
-rw-r--r--tests/auto/declarative/shared/debugutil.cpp81
-rw-r--r--tests/auto/declarative/shared/debugutil_p.h56
-rw-r--r--tests/benchmarks/declarative/creation/data/item.qml2
-rw-r--r--tests/benchmarks/declarative/creation/data/qobject.qml2
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml2
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/example.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/anchors/null.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/animation/large.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml2
-rw-r--r--tests/benchmarks/declarative/script/data/CustomObject.qml2
-rw-r--r--tests/benchmarks/declarative/script/data/block.qml2
-rw-r--r--tools/qdoc3/cppcodeparser.cpp44
-rw-r--r--tools/qdoc3/htmlgenerator.cpp4
-rw-r--r--tools/qml/content/Browser.qml2
-rw-r--r--tools/qml/loggerwidget.cpp70
-rw-r--r--tools/qml/loggerwidget.h63
-rw-r--r--tools/qml/main.cpp123
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.cpp2
-rw-r--r--tools/qml/qdeclarativetester.cpp13
-rw-r--r--tools/qml/qml.pri7
-rw-r--r--tools/qml/qmlruntime.cpp115
-rw-r--r--tools/qml/qmlruntime.h4
1198 files changed, 13074 insertions, 4147 deletions
diff --git a/demos/declarative/calculator/calculator.qmlproject b/demos/declarative/calculator/calculator.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/calculator/calculator.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/demos.qmlproject b/demos/declarative/demos.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/demos.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/flickr/common/LikeOMeter.qml b/demos/declarative/flickr/common/LikeOMeter.qml
deleted file mode 100644
index 17e3998..0000000
--- a/demos/declarative/flickr/common/LikeOMeter.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-import Qt 4.7
-
-Item {
- id: container
-
- property int rating: 2
-
- Row {
- Star {
- rating: 0
- onClicked: { container.rating = rating }
- on: container.rating >= 0
- }
- Star {
- rating: 1
- onClicked: { container.rating = rating }
- on: container.rating >= 1
- }
- Star {
- rating: 2
- onClicked: { container.rating = rating }
- on: container.rating >= 2
- }
- Star {
- rating: 3
- onClicked: { container.rating = rating }
- on: container.rating >= 3
- }
- Star {
- rating: 4
- onClicked: { container.rating = rating }
- on: container.rating >= 4
- }
- }
-}
diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml
deleted file mode 100644
index 8daed48..0000000
--- a/demos/declarative/flickr/common/Loading.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-import Qt 4.7
-
-Image {
- id: loading; source: "pics/loading.png"
- NumberAnimation on rotation {
- from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900
- }
-}
diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml
index d0960db..415a9e9 100644
--- a/demos/declarative/flickr/common/RssModel.qml
+++ b/demos/declarative/flickr/common/RssModel.qml
@@ -3,7 +3,12 @@ import Qt 4.7
XmlListModel {
property string tags : ""
- source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
+ function commasep(x)
+ {
+ return x.replace(' ',',');
+ }
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+commasep(tags)+"&" : "")+"format=rss2"
query: "/rss/channel/item"
namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
diff --git a/demos/declarative/flickr/common/Star.qml b/demos/declarative/flickr/common/Star.qml
deleted file mode 100644
index fcca742..0000000
--- a/demos/declarative/flickr/common/Star.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-import Qt 4.7
-
-Item {
- id: container
- width: 24
- height: 24
-
- property int rating
- property bool on
- signal clicked
-
- Image {
- id: starImage
- source: "pics/ghns_star.png"
- x: 6
- y: 7
- opacity: 0.4
- scale: 0.5
- }
- MouseArea {
- anchors.fill: container
- onClicked: { container.clicked() }
- }
- states: [
- State {
- name: "on"
- when: container.on == true
- PropertyChanges {
- target: starImage
- opacity: 1
- scale: 1
- x: 1
- y: 0
- }
- }
- ]
- transitions: [
- Transition {
- NumberAnimation {
- properties: "opacity,scale,x,y"
- easing.type: "OutBounce"
- }
- }
- ]
-}
diff --git a/demos/declarative/flickr/common/pics/background.png b/demos/declarative/flickr/common/pics/background.png
deleted file mode 100644
index 5b37072..0000000
--- a/demos/declarative/flickr/common/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button-pressed.png b/demos/declarative/flickr/common/pics/button-pressed.png
deleted file mode 100644
index e434d32..0000000
--- a/demos/declarative/flickr/common/pics/button-pressed.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button-pressed.sci b/demos/declarative/flickr/common/pics/button-pressed.sci
deleted file mode 100644
index b8db272..0000000
--- a/demos/declarative/flickr/common/pics/button-pressed.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 8
-border.top: 4
-border.bottom: 4
-border.right: 8
-source: button.png
diff --git a/demos/declarative/flickr/common/pics/button.png b/demos/declarative/flickr/common/pics/button.png
deleted file mode 100644
index 56a63ce..0000000
--- a/demos/declarative/flickr/common/pics/button.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button.sci b/demos/declarative/flickr/common/pics/button.sci
deleted file mode 100644
index b8db272..0000000
--- a/demos/declarative/flickr/common/pics/button.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 8
-border.top: 4
-border.bottom: 4
-border.right: 8
-source: button.png
diff --git a/demos/declarative/flickr/common/pics/ghns_star.png b/demos/declarative/flickr/common/pics/ghns_star.png
deleted file mode 100644
index 4ad43cc..0000000
--- a/demos/declarative/flickr/common/pics/ghns_star.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/loading.png b/demos/declarative/flickr/common/pics/loading.png
deleted file mode 100644
index 47a1589..0000000
--- a/demos/declarative/flickr/common/pics/loading.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/reflection.png b/demos/declarative/flickr/common/pics/reflection.png
deleted file mode 100644
index c143a48..0000000
--- a/demos/declarative/flickr/common/pics/reflection.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-bottom.png b/demos/declarative/flickr/common/pics/shadow-bottom.png
deleted file mode 100644
index 523f6e7..0000000
--- a/demos/declarative/flickr/common/pics/shadow-bottom.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-corner.png b/demos/declarative/flickr/common/pics/shadow-corner.png
deleted file mode 100644
index ef8c856..0000000
--- a/demos/declarative/flickr/common/pics/shadow-corner.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right-screen.png b/demos/declarative/flickr/common/pics/shadow-right-screen.png
deleted file mode 100644
index 9856c4f..0000000
--- a/demos/declarative/flickr/common/pics/shadow-right-screen.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right.png b/demos/declarative/flickr/common/pics/shadow-right.png
deleted file mode 100644
index f534a35..0000000
--- a/demos/declarative/flickr/common/pics/shadow-right.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index aa550d2..8b73beb 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -13,7 +13,6 @@ Item {
Image { source: "mobile/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
Common.RssModel { id: rssModel }
- Common.Loading { anchors.centerIn: parent; visible: rssModel.status == 2 }
Item {
id: views
@@ -22,8 +21,9 @@ Item {
Mobile.GridDelegate { id: gridDelegate }
GridView {
+ x: (width/4-79)/2; y: x
id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100
- cellWidth: 79; cellHeight: 79; width: parent.width; height: parent.height - 1; z: 6
+ cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height - 1; z: 6
}
Mobile.ListDelegate { id: listDelegate }
diff --git a/demos/declarative/flickr/flickr.qmlproject b/demos/declarative/flickr/flickr.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/flickr/flickr.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
index 72b779f..71d9385 100644
--- a/demos/declarative/flickr/mobile/TitleBar.qml
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -12,6 +12,7 @@ Item {
width: (parent.width * 2) - 55 ; height: parent.height
function accept() {
+ imageDetails.closed()
titleBar.state = ""
background.state = ""
rssModel.tags = editor.text
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
index d4b0039..93cd1c1 100644
--- a/demos/declarative/minehunt/minehunt.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -305,8 +305,6 @@ bool MinehuntGame::flag(int row, int col)
return true;
}
-QML_DECLARE_TYPE(TileData);
-
class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
diff --git a/demos/declarative/minehunt/minehunt.qmlproject b/demos/declarative/minehunt/minehunt.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/minehunt/minehunt.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
index cd9ecbc..d39b7bc 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
@@ -77,10 +77,12 @@ Component {
}
]
- GridView.onAdd: NumberAnimation { target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0 }
+ GridView.onAdd: NumberAnimation {
+ target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: "OutQuad"
+ }
GridView.onRemove: SequentialAnimation {
PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: true }
- NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0 }
+ NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: "OutQuad" }
PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: false }
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
index fd1fae9..c681064 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
@@ -4,7 +4,7 @@ Item {
id: container
property alias label: labelText.text
- property string tint: ""
+ property color tint: "#FFFFFFFF"
signal clicked
width: labelText.width + 70 ; height: labelText.height + 18
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
index e435425..ccfda02 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
@@ -4,7 +4,7 @@ Item {
id: container
property string label
- property string tint: ""
+ property color tint: "#FFFFFFFF"
signal clicked
signal labelChanged(string label)
diff --git a/demos/declarative/photoviewer/photoviewer.qmlproject b/demos/declarative/photoviewer/photoviewer.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/photoviewer/photoviewer.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
index bad1bf4..47f43c2 100644
--- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml
+++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
@@ -1,7 +1,8 @@
import Qt 4.7
import Qt.labs.particles 1.0
-Item { id:block
+Item {
+ id: block
property bool dying: false
property bool spawned: false
property int type: 0
@@ -11,7 +12,8 @@ Item { id:block
SpringFollow on x { enabled: spawned; to: targetX; spring: 2; damping: 0.2 }
SpringFollow on y { to: targetY; spring: 2; damping: 0.2 }
- Image { id: img
+ Image {
+ id: img
source: {
if(type == 0){
"pics/redStone.png";
@@ -26,10 +28,10 @@ Item { id:block
anchors.fill: parent
}
- Particles {
+ Particles {
id: particles
- width: 1; height: 1
+ width: 1; height: 1
anchors.centerIn: parent
emissionRate: 0
diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
index 0faabc9..6d5d75d 100644
--- a/demos/declarative/samegame/SamegameCore/Button.qml
+++ b/demos/declarative/samegame/SamegameCore/Button.qml
@@ -17,9 +17,9 @@ Rectangle {
GradientStop {
position: 0.0
color: {
- if (mouseArea.pressed)
+ if (mouseArea.pressed)
return activePalette.dark
- else
+ else
return activePalette.light
}
}
diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
index 8784348..d4f188c 100644
--- a/demos/declarative/samegame/SamegameCore/Dialog.qml
+++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
@@ -22,7 +22,7 @@ Rectangle {
border.width: 1
opacity: 0
- Behavior on opacity {
+ Behavior on opacity {
NumberAnimation { duration: 1000 }
}
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 3888381..aafbfdf 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -8,7 +8,7 @@ var blockSrc = "SamegameCore/BoomBlock.qml";
var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php";
var scoresURL = "";
var gameDuration;
-var component = createComponent(blockSrc);
+var component = Qt.createComponent(blockSrc);
//Index function used instead of a 2D array
function index(column,row) {
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 92201f5..f1b41c9 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -38,7 +38,7 @@ Rectangle {
Dialog {
id: nameInputDialog
-
+
property int initialWidth: 0
anchors.centerIn: parent
diff --git a/demos/declarative/samegame/samegame.qmlproject b/demos/declarative/samegame/samegame.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/samegame/samegame.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 12176c7..2457fbd 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -5,8 +5,8 @@ var links = new Array;
var scheduledDirections = new Array;
var numRows = 1;
var numColumns = 1;
-var linkComponent = createComponent("content/Link.qml"); // XXX should resolve relative to script, not component
-var cookieComponent = createComponent("content/Cookie.qml");
+var linkComponent = Qt.createComponent("content/Link.qml"); // XXX should resolve relative to script, not component
+var cookieComponent = Qt.createComponent("content/Cookie.qml");
var cookie;
var linksToGrow = 0;
var linksToDie = 0;
diff --git a/demos/declarative/snake/snake.qmlproject b/demos/declarative/snake/snake.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/snake/snake.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/twitter/twitter.qmlproject b/demos/declarative/twitter/twitter.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/twitter/twitter.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index 81904c6..46f45e0 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -45,7 +45,7 @@ Flickable {
smoothCache: true // We do want smooth rendering
fillColor: "white"
focus: true
- zoomFactor: 4
+ zoomFactor: 1
onAlert: console.log(message)
@@ -73,7 +73,7 @@ Flickable {
contentsScale: 1/zoomFactor
onContentsSizeChanged: {
// zoom out
- contentsScale = Math.min(0.25,flickable.width / contentsSize.width)
+ contentsScale = Math.min(1,flickable.width / contentsSize.width)
}
onUrlChanged: {
// got to topleft
diff --git a/demos/declarative/webbrowser/webbrowser.qmlproject b/demos/declarative/webbrowser/webbrowser.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/demos/declarative/webbrowser/webbrowser.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 751bf00..c465da4 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -67,7 +67,7 @@ Tutorial chapters:
\list 1
\o \l {QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks}{Creating the Game Canvas and Blocks}
-\o \l {QML Advanced Tutorial 2 - Populating the Game Canvas}{Populating the Game Canvas}}
+\o \l {QML Advanced Tutorial 2 - Populating the Game Canvas}{Populating the Game Canvas}
\o \l {QML Advanced Tutorial 3 - Implementing the Game Logic}{Implementing the Game Logic}
\o \l {QML Advanced Tutorial 4 - Finishing Touches}{Finishing Touches}
\endlist
@@ -83,10 +83,6 @@ directory.
\previouspage QML Advanced Tutorial
\nextpage QML Advanced Tutorial 2 - Populating the Game Canvas
-In this chapter:
-
-\tableofcontents
-
The files referenced on this page can be found in \c $QTDIR\examples\tutorials\samegame\samegame1.
\section2 Creating the application screen
@@ -109,7 +105,7 @@ is the \l SystemPalette item. This provides access to the Qt system palette
and is used to give the button a more native look-and-feel.
Notice the anchors for the \c Item, \c Button and \c Text elements are set using
-\l {Grouped Properties}{group notation} for readability.
+\l {codingconventions.html#Grouped-properties}{group notation} for readability.
\section2 Adding \c Button and \c Block components
@@ -152,10 +148,6 @@ elements to get started. Next, we will populate the game canvas with some blocks
\previouspage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
\nextpage QML Advanced Tutorial 3 - Implementing the Game Logic
-In this chapter:
-
-\tableofcontents
-
The files referenced on this page can be found in \c $QTDIR\examples\tutorials\samegame\samegame2.
@@ -224,10 +216,6 @@ Now, we have a screen of blocks, and we can begin to add the game mechanics.
\previouspage QML Advanced Tutorial 2 - Populating the Game Canvas
\nextpage QML Advanced Tutorial 4 - Finishing Touches
-In this chapter:
-
-\tableofcontents
-
The files referenced on this page can be found in \c $QTDIR\examples\tutorials\samegame\samegame3.
\section2 Making a playable game
@@ -313,10 +301,6 @@ until the next chapter - where your application becomes alive!
\contentspage QML Advanced Tutorial
\previouspage QML Advanced Tutorial 3 - Implementing the Game Logic
-In this chapter:
-
-\tableofcontents
-
The files referenced on this page can be found in \c $QTDIR\examples\tutorials\samegame\samegame4.
\section2 Adding some flair
@@ -432,7 +416,7 @@ If the player enters a name, we send the data to the service using this code in
\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1
-The \c XMLHttpRequest in this code is the same \c XMLHttpRequest() as you'll find in standard browser JavaScript, and can be used in the same way to dynamically get XML
+The \l XMLHttpRequest in this code is the same as the \c XMLHttpRequest() as you'll find in standard browser JavaScript, and can be used in the same way to dynamically get XML
or QML from the web service to display the high scores. We don't worry about the response in this case - we just post the high
score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same
way as you did with the blocks.
diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc
index 7ae5cbd..7ca206b 100644
--- a/doc/src/declarative/codingconventions.qdoc
+++ b/doc/src/declarative/codingconventions.qdoc
@@ -72,6 +72,7 @@ For example, a hypothetical \e photo QML object would look like this:
\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0
+\target Grouped properties
\section1 Grouped properties
If using multiple properties from a group of properties,
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index a2a5283..55945e6 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -75,7 +75,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {Introduction to the QML language}
\o \l {QML Tutorial}{Tutorial: 'Hello World'}
\o \l {QML Advanced Tutorial}{Tutorial: 'Same Game'}
-\o \l {QML Examples and Walkthroughs}
+\o \l {QML Examples and Demos}
\o \l {Using QML in C++ Applications}
\o \l {QML for Qt programmers}
\endlist
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index ce3a6e3..355c0f4 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -46,8 +46,6 @@
The following table lists the QML elements provided by the Qt Declarative module.
-\bold {Standard Qt Declarative Elements}
-
\table 80%
\header
\o \bold {States}
@@ -81,6 +79,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l PropertyAction
\o \l ScriptAction
\o \l Transition
+\o \l SmoothedFollow
\o \l SpringFollow
\o \l Behavior
\endlist
@@ -109,11 +108,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l QtObject
\o \l WorkerScript
\endlist
-\endtable
-\bold {QML Items}
-
-\table 80%
\header
\o \bold {Basic Visual Items}
\o \bold {Basic Interaction Items}
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index 3d8325e..dc6b76c 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -41,18 +41,22 @@
/*!
\page qdeclarativeexamples.html
-\title QML Examples and Walkthroughs
+\title QML Examples and Demos
-\section1 Running Examples and Demos
+\previouspage Graphics View Examples
+\contentspage Qt Examples
+\nextpage Painting Examples
+
+\section1 Running the examples
You can find many simple examples in the \c examples/declarative
sub-directory that show how to use various aspects of QML. In addition, the
\c demos/declarative sub-directory contains more sophisticated demos of large
applications. These demos are intended to show integrated functionality
-rather than being instructive on specifice elements.
+rather than being instructive on specific elements.
-To run the examples and demos, use the included \l {Qt Declarative UI Runtime}{qml}
-application. It has some useful options, revealed by:
+To run the examples and demos, you can use Qt Creator or the included \l {Qt Declarative UI Runtime}{qml}
+command-line application. It has some useful options, revealed by:
\code
bin/qml -help
@@ -66,18 +70,19 @@ For example, from your build directory, run:
\section1 Examples
-These will be documented, and demonstrate how to achieve various things in QML.
+\list
+\o \l{declarative/focus}{Focus}
+\endlist
+
+\section1 Demos
-\table
-\row
- \o Elastic Dial
- \o \image dial-example.gif
-\row
- \o \l{qdeclarativeexampletoggleswitch.html}{Toggle Switch}
- \o \image switch-example.gif
-\row
- \o \l{QML Advanced Tutorial}{SameGame}
- \o \image declarative-adv-tutorial4.gif
-\endtable
+\list
+\o \l{demos/declarative/calculator}{Calculator}
+\o \l{demos/declarative/minehunt}{Minehunt}
+\o \l{demos/declarative/photoviewer}{Photo Viewer}
+\o \l{demos/declarative/flickr}{Flickr Mobile}
+\o \l{demos/declarative/samegame}{Same Game}
+\o \l{demos/declarative/snake}{Snake}
+\endlist
*/
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index cc66838..307162e 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -57,11 +57,6 @@ element, the C++ class can be named differently, or appear in a namespace.
\snippet examples/declarative/extending/adding/person.h 0
-Following the class declaration, we include the QML_DECLARE_TYPE() macro. This
-is necessary to declare the type to QML. It also includes the logic necessary
-to expose the class to Qt's meta system - that is, it includes the
-Q_DECLARE_METATYPE() functionality.
-
\section1 Define the Person class
\snippet examples/declarative/extending/adding/person.cpp 0
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index e1c6469..c27d091 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -59,7 +59,7 @@ QML for their own independent use.
\snippet examples/declarative/extending/adding/example.qml 0
The QML snippet shown above instantiates one \c Person instance and sets
-the name and shoeSize properties on it. Everything in QML ultimately comes down
+the \c name and \c shoeSize properties on it. Everything in QML ultimately comes down
to either instantiating an object instance, or assigning a property a value.
QML relies heavily on Qt's meta object system and can only instantiate classes
that derive from QObject.
@@ -67,12 +67,11 @@ that derive from QObject.
The QML engine has no intrinsic knowledge of any class types. Instead the
programmer must define the C++ types, and their corresponding QML name.
-Custom C++ types are declared QML types using a macro and a template function:
+Custom C++ types are registered using a template function:
\quotation
\code
-#define QML_DECLARE_TYPE(T)
template<typename T>
int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
\endcode
@@ -81,10 +80,6 @@ Calling qmlRegisterType() registers the C++ type \a T with the QML system, and m
under the name \a qmlName in library \a uri version \a versionMajor.versionMinor.
The \a qmlName can be the same as the C++ type name.
-Generally the QML_DECLARE_TYPE() macro should be included immediately following
-the type declaration (usually in its header file), and the template function qmlRegisterType()
-called by the implementation.
-
Type \a T must be a concrete type that inherits QObject and has a default
constructor.
\endquotation
@@ -129,7 +124,7 @@ the \c Person type.
\snippet examples/declarative/extending/properties/example.qml 0
The QML snippet shown above assigns a \c Person object to the \c BirthdayParty's
-celebrant property, and assigns three \c Person objects to the guests property.
+\c host property, and assigns three \c Person objects to the guests property.
QML can set properties of types that are more complex than basic intrinsics like
integers and strings. Properties can also be object pointers, Qt interface
@@ -138,42 +133,37 @@ is typesafe it ensures that only valid types are assigned to these properties,
just like it does for primitive types.
Properties that are pointers to objects or Qt interfaces are declared with the
-Q_PROPERTY() macro, just like other properties. The celebrant property
+Q_PROPERTY() macro, just like other properties. The \c host property
declaration looks like this:
\snippet examples/declarative/extending/properties/birthdayparty.h 1
-As long as the property type, in this case Person, is registered with QML the
+As long as the property type, in this case \c Person, is registered with QML the
property can be assigned.
QML also supports assigning Qt interfaces. To assign to a property whose type
is a Qt interface pointer, the interface must also be registered with QML. As
they cannot be instantiated directly, registering a Qt interface is different
-from registering a new QML type. The following macro and function are used instead:
+from registering a new QML type. The following function is used instead:
\quotation
\code
-#define QML_DECLARE_INTERFACE(T)
template<typename T>
int qmlRegisterInterface(const char *typeName)
\endcode
Registers the C++ interface \a T with the QML system as \a typeName.
-Generally the QML_DECLARE_INTERFACE() macro should be included immediately
-following the interface declaration (usually in its header file), and the
-qmlRegisterInterface() template function called by the implementation.
-
Following registration, QML can coerce objects that implement this interface
for assignment to appropriately typed properties.
\endquotation
-The guests property is a list of \c Person objects. Properties that are lists
+The \c guests property is a list of \c Person objects. Properties that are lists
of objects or Qt interfaces are also declared with the Q_PROPERTY() macro, just
like other properties. List properties must have the type \c {QDeclarativeListProperty<T>}.
As with object properties, the type \a T must be registered with QML.
-The guest property declaration looks like this:
+The \c guest property declaration looks like this:
\snippet examples/declarative/extending/properties/birthdayparty.h 2
@@ -185,24 +175,23 @@ code used to create the \c BirthdayParty type.
\snippet examples/declarative/extending/coercion/example.qml 0
The QML snippet shown above assigns a \c Boy object to the \c BirthdayParty's
-celebrant property, and assigns three other objects to the guests property.
+\c host property, and assigns three other objects to the \c guests property.
-QML supports C++ inheritance heirarchies and can freely coerce between known,
+QML supports C++ inheritance hierarchies and can freely coerce between known,
valid object types. This enables the creation of common base classes that allow
the assignment of specialized classes to object or list properties. In the
-snippet shown, both the celebrant and the guests properties retain the Person
-type used in the previous section, but the assignment is valid as both the Boy
-and Girl objects inherit from Person.
+snippet shown, both the \c host and the \c guests properties retain the \c Person
+type used in the previous section, but the assignment is valid as both the \c Boy
+and \c Girl objects inherit from \c Person.
To assign to a property, the property's type must have been registered with QML.
Both the qmlRegisterType() and qmlRegisterInterface() template functions already
shown can be used to register a type with QML. Additionally, if a type that acts purely
as a base class that cannot be instantiated from QML needs to be
-registered these macro and function can be used:
+registered, the following function can be used:
\quotation
\code
- #define QML_DECLARE_TYPE(T)
template<typename T>
int qmlRegisterType()
\endcode
@@ -212,10 +201,6 @@ function qmlRegisterType() does not define a mapping between the
C++ class and a QML element name, so the type is not instantiable from QML, but
it is available for type coercion.
-Generally the QML_DECLARE_TYPE() macro should be included immediately following
-the type declaration (usually in its header file), and the
-qmlRegisterType() template function called from the implementation.
-
Type \a T must inherit QObject, but there are no restrictions on whether it is
concrete or the signature of its constructor.
\endquotation
@@ -234,7 +219,7 @@ code used to create the \c Boy and \c Girl types.
The QML snippet shown above assigns a collection of objects to the
\c BirthdayParty's default property.
-The default property is a syntactic convenience that allows a type designer to
+The \e {default property} is a syntactic convenience that allows a type designer to
specify a single property as the type's default. The default property is
assigned to whenever no explicit property is specified. As a convenience, it is
behaviorally identical to assigning the default property explicitly by name.
@@ -272,12 +257,12 @@ may also simplify the implementation of common property collections across
different types through implementation reuse.
A grouped property block is implemented as a read-only object property. The
-shoe property shown is declared like this:
+\c shoe property shown is declared like this:
\snippet examples/declarative/extending/grouped/person.h 1
-The ShoeDescription type declares the properties available to the grouped
-property block - in this case the size, color, brand and price properties.
+The \c ShoeDescription type declares the properties available to the grouped
+property block - in this case the \c size, \c color, \c brand and \c price properties.
Grouped property blocks may declared and accessed be recusively.
@@ -288,7 +273,7 @@ implement the \c shoe property grouping.
\snippet examples/declarative/extending/attached/example.qml 1
-The QML snippet shown above assigns the rsvp property using the attached
+The QML snippet shown above assigns the \c rsvp property using the attached
property syntax.
Attached properties allow unrelated types to annotate other types with some
@@ -297,7 +282,7 @@ identified through the use of the attacher type name, in the case shown
\c BirthdayParty, as a suffix to the property name.
In the example shown, \c BirthdayParty is called the attaching type, and the
-Boy instance the attachee object instance.
+\c Boy instance the attachee object instance.
For the attaching type, an attached property block is implemented as a new
QObject derived type, called the attachment object. The properties on the
@@ -320,7 +305,6 @@ public:
};
QML_DECLARE_TYPEINFO(MyType, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(MyType)
\endcode
Return an attachment object, of type \a AttachedPropertiesType, for the
attachee \a object instance. It is customary, though not strictly required, for
@@ -342,7 +326,7 @@ their effect may be so limited.
For example, a common usage scenario is for a type to enhance the properties
available to its children in order to gather instance specific data. Here we
-add a rsvp field to all the guests coming to a birthday party:
+add a \c rsvp field to all the guests coming to a birthday party:
\code
BirthdayParty {
Boy { BirthdayParty.rsvp: "2009-06-01" }
@@ -378,7 +362,7 @@ implement the rsvp attached property.
\section1 Memory Management and QVariant types
-It is an elements responsibility to ensure that it does not access or return
+It is an element's responsibility to ensure that it does not access or return
pointers to invalid objects. QML makes the following guarentees:
\list
@@ -443,7 +427,7 @@ implement the onPartyStarted signal property.
\snippet examples/declarative/extending/valuesource/example.qml 0
\snippet examples/declarative/extending/valuesource/example.qml 1
-The QML snippet shown above assigns a property value to the speaker property.
+The QML snippet shown above applies a property value source to the \c announcment property.
A property value source generates a value for a property that changes over time.
Property value sources are most commonly used to do animation. Rather than
@@ -451,9 +435,9 @@ constructing an animation object and manually setting the animation's "target"
property, a property value source can be assigned directly to a property of any
type and automatically set up this association.
-The example shown here is rather contrived: the speaker property of the
-BirthdayParty object is a string that is printed every time it is assigned and
-the HappyBirthday value source generates the lyrics of the song
+The example shown here is rather contrived: the \c announcment property of the
+\c BirthdayParty object is a string that is printed every time it is assigned and
+the \c HappyBirthdaySong value source generates the lyrics of the song
"Happy Birthday".
\snippet examples/declarative/extending/valuesource/birthdayparty.h 0
@@ -467,11 +451,11 @@ Property value sources are special types that derive from the
QDeclarativePropertyValueSource base class. This base class contains a single method,
QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
associating the property value source with a property. The relevant part of
-the HappyBirthday type declaration looks like this:
+the \c HappyBirthdaySong type declaration looks like this:
-\snippet examples/declarative/extending/valuesource/happybirthday.h 0
-\snippet examples/declarative/extending/valuesource/happybirthday.h 1
-\snippet examples/declarative/extending/valuesource/happybirthday.h 2
+\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 0
+\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 1
+\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 2
In all other respects, property value sources are regular QML types. They must
be registered with the QML engine using the same macros as other types, and can
@@ -479,11 +463,11 @@ contain properties, signals and methods just like other types.
When a property value source object is assigned to a property, QML first tries
to assign it normally, as though it were a regular QML type. Only if this
-assignment fails does the engine call the setTarget() method. This allows
+assignment fails does the engine call the \l {QDeclarativePropertyValueSource::}{setTarget()} method. This allows
the type to also be used in contexts other than just as a value source.
\l {Extending QML - Property Value Source Example} shows the complete code used
-implement the HappyBirthday property value source.
+implement the \c HappyBirthdaySong property value source.
\section1 Property Binding
@@ -491,7 +475,7 @@ implement the HappyBirthday property value source.
\snippet examples/declarative/extending/binding/example.qml 1
The QML snippet shown above uses a property binding to ensure the
-HappyBirthday's name property remains up to date with the celebrant.
+\c HappyBirthdaySong's \c name property remains up to date with the \c host.
Property binding is a core feature of QML. In addition to assigning literal
values, property bindings allow the developer to assign an arbitrarily complex
@@ -504,9 +488,9 @@ All properties on custom types automatically support property binding. However,
for binding to work correctly, QML must be able to reliably determine when a
property has changed so that it knows to reevaluate any bindings that depend on
the property's value. QML relies on the presence of a
-\c {Qt's Property System}{NOTIFY signal} for this determination.
+\l {Qt's Property System}{NOTIFY signal} for this determination.
-Here is the celebrant property declaration:
+Here is the \c host property declaration:
\snippet examples/declarative/extending/binding/birthdayparty.h 0
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index 97f5d91..6709ab4 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -190,10 +190,10 @@ This function attempts to open the specified \c target url in an external applic
This function returns a hex string of the md5 hash of \c data.
\section3 Qt.btoa(data)
-This function returns a base64 encoding of \c data.
+Binary to ASCII - this function returns a base64 encoding of \c data.
\section3 Qt.atob(data)
-This function returns a base64 decoding of \c data.
+ASCII to binary - this function returns a base64 decoding of \c data.
\section3 Qt.quit()
This function causes the QML engine to emit the quit signal, which in
@@ -258,6 +258,11 @@ of their use.
}
\endcode
+ The methods and properties of the Component element are defined in its own
+ page, but when using it dynamically only two methods are usually used.
+ Component.createObject() returns the created object or null if there is an error.
+ If there is an error, Component.errorsString() describes what the error was.
+
If you want to just create an arbitrary string of QML, instead of
loading a QML file, consider the createQmlObject() function.
@@ -277,7 +282,9 @@ of their use.
similarly to eval, but for creating QML elements.
Returns the created object, or null if there is an error. In the case of an
- error, details of the error are output using qWarning().
+ error, a QtScript Error object is thrown. This object has the additional property,
+ qmlErrors, which is an array of all the errors encountered when trying to execute the
+ QML. Each object in the array has the members: lineNumber, columnNumber, fileName and message.
Note that this function returns immediately, and therefore may not work if
the QML loads new components. If you are trying to load a new component,
@@ -286,11 +293,81 @@ of their use.
been loaded, and so it is safe to use createQmlObject to load built-in
components.
-\section1 Asynchronous JavaScript and XML
-QML script supports the XMLHttpRequest object, which can be used to asynchronously obtain data from over a network.
-\section2 XMLHttpRequest()
-In QML you can construct an XMLHttpRequest object just like in a web browser! TODO: Real documentation for this object.
+\section1 XMLHttpRequest
+
+\target XMLHttpRequest
+
+QML script supports the XMLHttpRequest object, which can be used to asynchronously obtain
+data from over a network.
+
+The XMLHttpRequest API implements the same \l {http://www.w3.org/TR/XMLHttpRequest/}{W3C standard}
+as many popular web browsers with following exceptions:
+\list
+\i QML's XMLHttpRequest does not enforce the same origin policty.
+\i QML's XMLHttpRequest does not support \e synchronous requests.
+\endlist
+
+Additionally, the \c responseXML XML DOM tree currently supported by QML is a reduced subset
+of the \l {http://www.w3.org/TR/DOM-Level-3-Core/}{DOM Level 3 Core} API supported in a web
+browser. The following objects and properties are supported by the QML implementation:
+\table
+\header
+\o \bold {Node}
+\o \bold {Document}
+\o \bold {Element}
+\o \bold {Attr}
+\o \bold {CharacterData}
+\o \bold {Text}
+
+\row
+\o
+\list
+\o nodeName
+\o nodeValue
+\o nodeType
+\o parentNode
+\o childNodes
+\o firstChild
+\o lastChild
+\o previousSibling
+\o nextSibling
+\o attribtes
+\endlist
+
+\o
+\list
+\o xmlVersion
+\o xmlEncoding
+\o xmlStandalone
+\o documentElement
+\endlist
+
+\o
+\list
+\o tagName
+\endlist
+
+\o
+\list
+\o name
+\o value
+\o ownerElement
+\endlist
+
+\o
+\list
+\o data
+\o length
+\endlist
+
+\o
+\list
+\o isElementContentWhitespace
+\o wholeText
+\endlist
+
+\endtable
\section1 Offline Storage API
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index d4034fa..65413ec 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -115,8 +115,7 @@ any custom C++ types and create a plugin that registers the custom types
so that they can be used from your QML file.
Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle,
-that both inherit from QGraphicsWidget. First, you need to register these two types
-using the \c QML_DECLARE_TYPE macro from \c <QtDeclarative/qdeclarative.h>, like this:
+that both inherit from QGraphicsWidget:
\c [graphicswidgets/redsquare.h]
\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index 8ffe58c..7c0570e 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -47,7 +47,7 @@ QML encourages building UIs declaratively, using \l {Property Binding} and the
composition of existing \l {QML Elements}. To allow the implementation of more
advanced behavior, QML integrates tightly with imperative JavaScript code.
-The JavaScript environment provided by QML is stricter than that in a webbrowser.
+The JavaScript environment provided by QML is stricter than that in a web browser.
In QML you cannot add, or modify, members of the JavaScript global object. It
is possible to do this accidentally by using a variable without declaring it. In
QML this will throw an exception, so all local variables should be explicitly
@@ -66,7 +66,7 @@ them.
\code
Item {
function factorial(a) {
- a = Integer(a);
+ a = parseInt(a);
if (a <= 0)
return 1;
else
@@ -104,12 +104,12 @@ Item {
}
\endcode
-Both relative and absolute JavaScript URLs can be imported. In the case of a
-relative URL, the location is resolved relative to the location of the
-\l {QML Document} that contains the import. If the script file is not accessible,
-an error will occur. If the JavaScript needs to be fetched from a network
+Both relative and absolute JavaScript URLs can be imported. In the case of a
+relative URL, the location is resolved relative to the location of the
+\l {QML Document} that contains the import. If the script file is not accessible,
+an error will occur. If the JavaScript needs to be fetched from a network
resource, the QML document has a "Loading"
-\l {QDeclarativeComponent::status()}{status} until the script has been
+\l {QDeclarativeComponent::status()}{status} until the script has been
downloaded.
Imported JavaScript files are always qualified using the "as" keyword. The
@@ -143,7 +143,7 @@ stateless library through the use of a pragma, as shown in the following example
.pragma library
function factorial(a) {
- a = Integer(a);
+ a = parseInt(a);
if (a <= 0)
return 1;
else
@@ -160,7 +160,7 @@ parameters.
\section1 Running JavaScript at Startup
It is occasionally necessary to run some imperative code at application (or
-component instance) "startup". While it is tempting to just include the startup
+component instance) startup. While it is tempting to just include the startup
script as \e {global code} in an external script file, this can have severe limitations
as the QML environment may not have been fully established. For example, some objects
might not have been created or some \l {Property Binding}s may not have been run.
@@ -180,7 +180,7 @@ Rectangle {
}
\endcode
-Any element in a QML file - including nested elements and nested QML component
+Any element in a QML file - including nested elements and nested QML component
instances - can use this attached property. If there is more than one \c onCompleted()
handler to execute at startup, they are run sequentially in an undefined order.
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
index 0a26c68..d268a13 100644
--- a/doc/src/declarative/network.qdoc
+++ b/doc/src/declarative/network.qdoc
@@ -69,8 +69,10 @@ Network transparency is supported throughout QML, for example:
\endlist
Even QML types themselves can be on the network - if the \l {Qt Declarative UI Runtime}{qml} tool is used to load
-\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", this
-will load from \tt http://example.com/mystuff/World.qml just as it would for a local file.
+\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", the engine
+will load \tt http://example.com/mystuff/qmldir and resolve the type just as it would for a local file.
+For example if the qmldir file contains the line "World World.qml", it will load
+\tt http://example.com/mystuff/World.qml
Any other resources that \tt Hello.qml referred to, usually by a relative URL, would
similarly be loaded from the network.
diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
index 02f9868..ab3682d 100644
--- a/doc/src/declarative/propertybinding.qdoc
+++ b/doc/src/declarative/propertybinding.qdoc
@@ -78,16 +78,52 @@ Rectangle {
}
\endcode
-Being JavaScript expressions, bindings are evaluated in a scope chain. The \l {QML Scope}
-documentation covers the specifics of scoping in QML.
-
-\list
-\o When does a binding not get updated?
-\o Scope
-\o Assigning a constant/other binding clears existing binding
-\o Loops
-\o Using model data
-\endlist
+While syntactically bindings can be of arbitrary complexity, if a binding starts to become
+overly complex - such as involving multiple lines, or imperative loops - it may be better
+to refactor the component entirely, or at least factor the binding out into a separate
+function.
+
+\section1 Changing Bindings
+
+The \l PropertyChanges element can be used within a state change to modify the bindings on
+properties.
+
+This example modifies the \l Rectangle's width property binding to be \c {otherItem.height}
+when in the "square" state. When it returns to its default state, width's original property
+binding will have been restored.
+
+\code
+Rectangle {
+ id: rectangle
+ width: otherItem.width
+ height: otherItem.height
+
+ states: State {
+ name: "square"
+ PropertyChanges {
+ target: rectangle
+ width: otherItem.height
+ }
+ }
+}
+\endcode
+
+Imperatively assigning a value directly to a property will also implicitly remove a binding
+on a property. A property can only have one value at a time, and if code explicitly sets
+this value the binding must be removed. The \l Rectangle in the example below will have
+a width of 13, regardless of the otherItem's width.
+
+\code
+Rectangle {
+ width: otherItem.width
+
+ Component.onCompleted: {
+ width = 13;
+ }
+}
+\endcode
+
+There is no way to create a property binding directly from imperative JavaScript code.
\section1 Binding Element
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index d8b2a5d..91acb3c 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -206,8 +206,16 @@ The default role names set by Qt are:
\endtable
QAbstractItemModel presents a heirachy of tables. Views currently provided by QML
-can only display list data. In order to display child lists of a heirachical model
-use the VisualDataModel element with \e rootIndex set to a parent node.
+can only display list data.
+In order to display child lists of a heirachical model
+the VisualDataModel element provides several properties and functions for use
+with models of type QAbstractItemModel:
+\list
+\o \e hasModelChildren role property to determine whether a node has child nodes.
+\o \l VisualDataModel::rootIndex allows the root node to be specifed
+\o \l VisualDataModel::modelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
+\o \l VisualDataModel::parentModelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
+\endlist
\section2 QStringList
@@ -225,7 +233,7 @@ dataList.append("Ginger");
dataList.append("Skipper");
QDeclarativeContext *ctxt = view.rootContext();
-ctxt->setContextProperty("myModel", QVariant::fromValue(&dataList));
+ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
\endcode
\o
diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc
index b2cfba8..4c1f449 100644
--- a/doc/src/declarative/qdeclarativereference.qdoc
+++ b/doc/src/declarative/qdeclarativereference.qdoc
@@ -55,7 +55,7 @@
That is, you specify \e what the UI should look like and how it should behave
rather than specifying step-by-step \e how to build it. Specifying a UI declaratively
does not just include the layout of the interface items, but also the way each
- individual item looks and behaves and the overall flow of the application.
+ individual item looks and behaves and the overall flow of the application.
The QML elements provide a sophisticated set of graphical and behavioral building
blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
@@ -67,7 +67,7 @@
\o \l {Introduction to the QML language}
\o \l {QML Tutorial}{Tutorial: 'Hello World'}
\o \l {QML Advanced Tutorial}{Advanced Tutorial: 'Same Game'}
- \o \l {QML Examples and Walkthroughs}
+ \o \l {QML Examples and Demos}
\endlist
\section1 Core QML Features:
diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc
index 290d78f..91d6d87 100644
--- a/doc/src/declarative/qdeclarativesecurity.qdoc
+++ b/doc/src/declarative/qdeclarativesecurity.qdoc
@@ -72,7 +72,7 @@ A non-exhaustive list of the ways you could shoot yourself in the foot is:
\list
\i Using \c import to import QML or JavaScript you do not control. BAD
\i Using \l Loader to import QML you do not control. BAD
- \i Using \l{XMLHttpRequest()}{XMLHttpRequest} to load data you do not control and executing it. BAD
+ \i Using \l{XMLHttpRequest}{XMLHttpRequest} to load data you do not control and executing it. BAD
\endlist
However, the above does not mean that you have no use for the network transparency of QML.
@@ -81,7 +81,7 @@ There are many good and useful things you \e can do:
\list
\i Create \l Image elements with source URLs of any online images. GOOD
\i Use XmlListModel to present online content. GOOD
- \i Use \l{XMLHttpRequest()}{XMLHttpRequest} to interact with online services. GOOD
+ \i Use \l{XMLHttpRequest}{XMLHttpRequest} to interact with online services. GOOD
\endlist
The only reason this page is necessary at all is that JavaScript, when run in a \e{web browser},
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index cbb2146..670a218 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -70,9 +70,7 @@
\macro QML_DECLARE_TYPE()
\relates QDeclarativeEngine
- Declares a C++ type to be usable in the QML system. In addition
- to this, a type must also be registered with the QML system using
- qmlRegisterType().
+ Equivalent to Q_DECLARE_METATYPE(TYPE) and Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
*/
@@ -81,9 +79,8 @@
\relates QDeclarativeEngine
This template function registers the C++ type in the QML system with
- the name \a qmlName. in the library imported from \a uri having the
+ the name \a qmlName, in the library imported from \a uri having the
version number composed from \a versionMajor and \a versionMinor.
- The type should also haved been declared with the QML_DECLARE_TYPE() macro.
Returns the QML type id.
@@ -94,6 +91,63 @@
qmlRegisterType<MinehuntGame>("MinehuntCore", 0, 1, "Game");
\endcode
+ Note that it's perfectly reasonable for a library to register types to older versions
+ than the actual version of the library. Indeed, it is normal for the new library to allow
+ QML written to previous versions to continue to work, even if more advanced versions of
+ some of its types are available.
+*/
+
+/*!
+ \fn int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
+ \relates QDeclarativeEngine
+
+ This template function registers the C++ type in the QML system with
+ the name \a qmlName, in the library imported from \a uri having the
+ version number composed from \a versionMajor and \a versionMinor.
+
+ While the type has a name and a type, it cannot be created, and the
+ given error \a message will result if creation is attempted.
+
+ This is useful where the type is only intended for providing attached properties or enum values.
+
+ Returns the QML type id.
+
+ \sa qmlRegisterTypeNotAvailable
+*/
+
+/*!
+ \fn int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
+ \relates QDeclarativeEngine
+
+ This function registers a type in the QML system with the name \a qmlName, in the library imported from \a uri having the
+ version number composed from \a versionMajor and \a versionMinor, but any attempt to instantiate the type
+ will produce the given error \a message.
+
+ Normally, the types exported by a module should be fixed. However, if a C++ type is not available, you should
+ at least "reserve" the QML type name, and give the user of your module a meaningful error message.
+
+ Returns the QML type id.
+
+ Example:
+
+ \code
+ #ifdef NO_GAMES_ALLOWED
+ qmlRegisterTypeNotAvailable("MinehuntCore", 0, 1, "Game", "Get back to work, slacker!");
+ #else
+ qmlRegisterType<MinehuntGame>("MinehuntCore", 0, 1, "Game");
+ #endif
+ \endcode
+
+ This will cause any QML which uses this module and attempts to use the type to produce an error message:
+ \code
+fun.qml: Get back to work, slacker!
+ Game {
+ ^
+ \endcode
+
+ Without this, a generic "Game is not a type" message would be given.
+
+ \sa qmlRegisterUncreatableType
*/
/*!
@@ -114,7 +168,6 @@
This template function registers the C++ type in the QML system
under the name \a typeName.
- The type should also haved been declared with the QML_DECLARE_TYPE() macro.
Returns the QML type id.
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
index 028718f..73d66b7 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
@@ -39,7 +39,6 @@
**
****************************************************************************/
//![0]
-#include <QtDeclarative/qdeclarative.h>
#include <QGraphicsWidget>
#include <QPainter>
@@ -53,6 +52,4 @@ public:
painter->drawEllipse(0, 0, size().width(), size().height());
}
};
-
-QML_DECLARE_TYPE(BlueCircle)
//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
index 76e7d11..3050662 100644
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
@@ -39,7 +39,6 @@
**
****************************************************************************/
//![0]
-#include <QtDeclarative/qdeclarative.h>
#include <QGraphicsWidget>
#include <QPainter>
@@ -52,6 +51,4 @@ public:
painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red));
}
};
-
-QML_DECLARE_TYPE(RedSquare)
//![0]
diff --git a/doc/src/examples/qml-calculator.qdoc b/doc/src/examples/qml-calculator.qdoc
new file mode 100644
index 0000000..ca05da9
--- /dev/null
+++ b/doc/src/examples/qml-calculator.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Calculator
+ \example demos/declarative/calculator
+
+ This demo shows how to write a simple calculator application in QML and JavaScript.
+
+ \image qml-calculator-example.png
+*/
diff --git a/doc/src/examples/qml-flickr.qdoc b/doc/src/examples/qml-flickr.qdoc
new file mode 100644
index 0000000..ebf3250
--- /dev/null
+++ b/doc/src/examples/qml-flickr.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Flickr Mobile
+ \example demos/declarative/flickr
+
+ This demo shows how to write a mobile Flickr browser application in QML.
+
+ \image qml-flickr-example.png
+*/
diff --git a/doc/src/examples/qml-focus.qdoc b/doc/src/examples/qml-focus.qdoc
new file mode 100644
index 0000000..92d93b2
--- /dev/null
+++ b/doc/src/examples/qml-focus.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Focus
+ \example declarative/focus
+
+ This example shows how to handle keys and focus in QML.
+
+ \image qml-focus-example.png
+*/
diff --git a/doc/src/examples/qml-minehunt.qdoc b/doc/src/examples/qml-minehunt.qdoc
new file mode 100644
index 0000000..773f216
--- /dev/null
+++ b/doc/src/examples/qml-minehunt.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Minehunt
+ \example demos/declarative/minehunt
+
+ This demo shows how to create a simple Minehunt game with QML and C++.
+
+ \image qml-minehunt-example.png
+*/
diff --git a/doc/src/examples/qml-photoviewer.qdoc b/doc/src/examples/qml-photoviewer.qdoc
new file mode 100644
index 0000000..d1c3da2
--- /dev/null
+++ b/doc/src/examples/qml-photoviewer.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Photo Viewer
+ \example demos/declarative/photoviewer
+
+ This demo shows how to write a Flickr photo viewer application in QML.
+
+ \image qml-photoviewer-example.png
+*/
diff --git a/doc/src/examples/qml-samegame.qdoc b/doc/src/examples/qml-samegame.qdoc
new file mode 100644
index 0000000..d9a9c7c
--- /dev/null
+++ b/doc/src/examples/qml-samegame.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Same Game
+ \example demos/declarative/samegame
+
+ This demo shows how to write a Same Game in QML.
+
+ \image qml-samegame-example.png
+*/
diff --git a/doc/src/examples/qml-snake.qdoc b/doc/src/examples/qml-snake.qdoc
new file mode 100644
index 0000000..373ca13
--- /dev/null
+++ b/doc/src/examples/qml-snake.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Snake
+ \example demos/declarative/snake
+
+ This demo shows how to write a Snake game in QML.
+
+ \image qml-snake-example.png
+*/
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 885e96c..071a107 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -151,6 +151,16 @@
classes.
\clearfloat
+ \section1 \l{QML Examples and Demos}{Declarative}
+ \beginfloatleft
+ \l{QML Examples and Demos}{\inlineimage declarative-examples.png
+ }
+
+ \endfloat
+ The Qt Declarative module provides a declarative framework for building
+ highly dynamic, custom user interfaces.
+
+ \clearfloat
\section1 \l{Painting Examples}{Painting}
\beginfloatleft
\l{Painting Examples}{\inlineimage painting-examples.png
@@ -626,7 +636,7 @@
\previouspage Item Views Examples
\contentspage Qt Examples
- \nextpage Painting Examples
+ \nextpage QML Examples and Demos
\image graphicsview-examples.png
@@ -669,7 +679,7 @@
\page examples-painting.html
\title Painting Examples
- \previouspage Graphics View Examples
+ \previouspage QML Examples and Demos
\contentspage Qt Examples
\nextpage Rich Text Examples
@@ -1323,7 +1333,7 @@
\o \l{dbus/complexpingpong}{Complex Ping Pong}
\o \l{dbus/listnames}{List Names}
\o \l{dbus/pingpong}{Ping Pong}
- \o \l{dbus/remotecontrolledcar}{Remote Controlled Car}
+ \o \l{dbus/remotecontrolledcar}{Remote Controlled Car}
\endlist
Examples marked with an asterisk (*) are fully documented.
diff --git a/doc/src/images/declarative-examples.png b/doc/src/images/declarative-examples.png
new file mode 100644
index 0000000..913dfac
--- /dev/null
+++ b/doc/src/images/declarative-examples.png
Binary files differ
diff --git a/doc/src/images/qml-calculator-example.png b/doc/src/images/qml-calculator-example.png
new file mode 100644
index 0000000..19ce1b6
--- /dev/null
+++ b/doc/src/images/qml-calculator-example.png
Binary files differ
diff --git a/doc/src/images/qml-flickr-example.png b/doc/src/images/qml-flickr-example.png
new file mode 100644
index 0000000..71ea567
--- /dev/null
+++ b/doc/src/images/qml-flickr-example.png
Binary files differ
diff --git a/doc/src/images/qml-focus-example.png b/doc/src/images/qml-focus-example.png
new file mode 100644
index 0000000..5a114a0
--- /dev/null
+++ b/doc/src/images/qml-focus-example.png
Binary files differ
diff --git a/doc/src/images/qml-minehunt-example.png b/doc/src/images/qml-minehunt-example.png
new file mode 100644
index 0000000..3b69569
--- /dev/null
+++ b/doc/src/images/qml-minehunt-example.png
Binary files differ
diff --git a/doc/src/images/qml-photoviewer-example.png b/doc/src/images/qml-photoviewer-example.png
new file mode 100644
index 0000000..be6f1bf
--- /dev/null
+++ b/doc/src/images/qml-photoviewer-example.png
Binary files differ
diff --git a/doc/src/images/qml-samegame-example.png b/doc/src/images/qml-samegame-example.png
new file mode 100644
index 0000000..c17b4e0
--- /dev/null
+++ b/doc/src/images/qml-samegame-example.png
Binary files differ
diff --git a/doc/src/images/qml-snake-example.png b/doc/src/images/qml-snake-example.png
new file mode 100644
index 0000000..d3c077d
--- /dev/null
+++ b/doc/src/images/qml-snake-example.png
Binary files differ
diff --git a/doc/src/snippets/declarative/script.js b/doc/src/snippets/declarative/script.js
new file mode 100644
index 0000000..cd67311
--- /dev/null
+++ b/doc/src/snippets/declarative/script.js
@@ -0,0 +1 @@
+# Just here so that workerscript.qml succeeds.
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 1c78118..d5920b9 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -719,6 +719,21 @@
float: right;
color: #254117;
}
+
+ .qmldefault
+ {
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ *.qmlitem p
+ {
+ }
+
#feedbackBox
{
display:none;
diff --git a/examples/declarative/animations/animations.qmlproject b/examples/declarative/animations/animations.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/animations/animations.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/aspectratio/aspectratio.qmlproject b/examples/declarative/aspectratio/aspectratio.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/aspectratio/aspectratio.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/behaviors/behaviors.qmlproject b/examples/declarative/behaviors/behaviors.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/behaviors/behaviors.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/border-image/border-image.qmlproject b/examples/declarative/border-image/border-image.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/border-image/border-image.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/clocks/clocks.qmlproject b/examples/declarative/clocks/clocks.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/clocks/clocks.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/connections/connections.qmlproject b/examples/declarative/connections/connections.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/connections/connections.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
index 98ea6c4..e37c3d4 100644
--- a/examples/declarative/declarative.pro
+++ b/examples/declarative/declarative.pro
@@ -5,6 +5,7 @@ SUBDIRS = \
extending \
imageprovider \
objectlistmodel \
+ stringlistmodel \
plugins \
proxywidgets
diff --git a/examples/declarative/dial/dial.qmlproject b/examples/declarative/dial/dial.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/dial/dial.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
index eea528f..0e6e197 100644
--- a/examples/declarative/dynamic/dynamic.qml
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -7,6 +7,34 @@ Item {
//This is a desktop-sized example
width: 1024; height: 512
property int activeSuns: 0
+
+ //This is the message that pops up when there's an error
+ Rectangle{
+ id: dialog
+ opacity: 0
+ anchors.centerIn: parent
+ width: dialogText.width + 6
+ height: dialogText.height + 6
+ border.color: 'black'
+ color: 'lightsteelblue'
+ z: 65535 //Arbitrary number chosen to be above all the items, including the scaled perspective ones.
+ function show(str){
+ dialogText.text = str;
+ dialogAnim.start();
+ }
+ Text{
+ id: dialogText
+ x:3
+ y:3
+ font.pixelSize: 14
+ }
+ SequentialAnimation{
+ id: dialogAnim
+ NumberAnimation{target: dialog; property:"opacity"; to: 1; duration: 1000}
+ PauseAnimation{duration: 5000}
+ NumberAnimation{target: dialog; property:"opacity"; to: 0; duration: 1000}
+ }
+ }
// sky
Rectangle { id: sky
@@ -114,7 +142,14 @@ Item {
}
Button {
text: "Create"
- onClicked: createQmlObject(qmlText.text, window, 'CustomObject');
+ function makeCustom() {
+ try{
+ Qt.createQmlObject(qmlText.text, window, 'CustomObject');
+ }catch(err){
+ dialog.show('Error on line ' + err.qmlErrors[0].lineNumber + '\n' + err.qmlErrors[0].message );
+ }
+ }
+ onClicked: makeCustom();
}
}
}
diff --git a/examples/declarative/dynamic/dynamic.qmlproject b/examples/declarative/dynamic/dynamic.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/dynamic/dynamic.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/dynamic/qml/itemCreation.js b/examples/declarative/dynamic/qml/itemCreation.js
index ccc03aa..4fa0d9f 100644
--- a/examples/declarative/dynamic/qml/itemCreation.js
+++ b/examples/declarative/dynamic/qml/itemCreation.js
@@ -31,7 +31,7 @@ function loadComponent() {
if (itemComponent != null) //Already loaded the component
createItem();
- itemComponent = createComponent(itemButton.file);
+ itemComponent = Qt.createComponent(itemButton.file);
//print(itemButton.file)
if(itemComponent.isLoading){
component.statusChanged.connect(finishCreation);
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
deleted file mode 100644
index feb7c69..0000000
--- a/examples/declarative/effects/effects.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 400; height: 200
-
- Image {
- id: blur
- x: 5
- source: "pic.png"
-
- effect: Blur {
- NumberAnimation on blurRadius {
- id: blurEffect
- running: false
- from: 0; to: 10
- duration: 1000
- loops: Animation.Infinite
- }
- }
-
- MouseArea { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
- }
-
- Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
-
- Image {
- id: dropShadow
- source: "pic.png"
- x: 135
-
- effect: DropShadow {
- blurRadius: 3
- offset.x: 3
-
- NumberAnimation on offset.y {
- id: dropShadowEffect
- from: 0; to: 10
- duration: 1000
- running: false
- loops: Animation.Infinite
- }
- }
-
- MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
- }
-
- Image {
- id: colorize
- source: "pic.png"
- x: 265
-
- effect: Colorize { color: "blue" }
- }
-
- Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
-
- Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
-
- Text {
- y: 155; anchors.horizontalCenter: parent.horizontalCenter
- text: "Clicking Blur or Drop Shadow will \ntoggle animation."
- color: "black"
- }
-
-}
diff --git a/examples/declarative/effects/pic.png b/examples/declarative/effects/pic.png
deleted file mode 100644
index 051e738..0000000
--- a/examples/declarative/effects/pic.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/examples.qmlproject b/examples/declarative/examples.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/examples.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/extending/adding/example.qml
index c608f94..dc891e7 100644
--- a/examples/declarative/extending/adding/example.qml
+++ b/examples/declarative/extending/adding/example.qml
@@ -1,6 +1,6 @@
+// ![0]
import People 1.0
-// ![0]
Person {
name: "Bob Jones"
shoeSize: 12
diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/extending/adding/main.cpp
index b9e5aa3..7b33895 100644
--- a/examples/declarative/extending/adding/main.cpp
+++ b/examples/declarative/extending/adding/main.cpp
@@ -47,8 +47,9 @@
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-
+//![0]
qmlRegisterType<Person>("People", 1,0, "Person");
+//![0]
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/extending/adding/person.h
index fbaf2df..d6de9a9 100644
--- a/examples/declarative/extending/adding/person.h
+++ b/examples/declarative/extending/adding/person.h
@@ -43,12 +43,11 @@
#include <QObject>
// ![0]
-#include <qdeclarative.h>
-
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -57,11 +56,11 @@ public:
int shoeSize() const;
void setShoeSize(int);
+
private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
// ![0]
#endif // PERSON_H
diff --git a/examples/declarative/extending/attached/birthdayparty.cpp b/examples/declarative/extending/attached/birthdayparty.cpp
index d4f2675..7fa1748 100644
--- a/examples/declarative/extending/attached/birthdayparty.cpp
+++ b/examples/declarative/extending/attached/birthdayparty.cpp
@@ -56,18 +56,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
}
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h
index d8ca2e1..1c66f8c 100644
--- a/examples/declarative/extending/attached/birthdayparty.h
+++ b/examples/declarative/extending/attached/birthdayparty.h
@@ -48,8 +48,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -59,19 +59,18 @@ public:
private:
QDate m_rsvp;
};
-QML_DECLARE_TYPE(BirthdayPartyAttached)
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
@@ -79,11 +78,10 @@ public:
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(BirthdayParty)
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/extending/attached/example.qml
index 952eb93..50f0a32 100644
--- a/examples/declarative/extending/attached/example.qml
+++ b/examples/declarative/extending/attached/example.qml
@@ -1,16 +1,17 @@
import People 1.0
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
// ![1]
Boy {
- name: "Joan Hodges"
- BirthdayParty.rsvp: "2009-07-06"
+ name: "Leo Hodges"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+
+ BirthdayParty.rsvp: "2009-07-06"
}
// ![1]
Boy {
@@ -19,11 +20,12 @@ BirthdayParty {
}
Girl {
name: "Anne Brown"
- BirthdayParty.rsvp: "2009-07-01"
shoe.size: 7
shoe.color: "red"
shoe.brand: "Marc Jacobs"
shoe.price: 699.99
+
+ BirthdayParty.rsvp: "2009-07-01"
}
}
diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/extending/attached/main.cpp
index fd2d525..f1055ae 100644
--- a/examples/declarative/extending/attached/main.cpp
+++ b/examples/declarative/extending/attached/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/extending/attached/person.h
index 08caebf..2f444c5 100644
--- a/examples/declarative/extending/attached/person.h
+++ b/examples/declarative/extending/attached/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -71,12 +71,12 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,20 +88,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/binding/binding.pro b/examples/declarative/extending/binding/binding.pro
index 903712e..896ce25 100644
--- a/examples/declarative/extending/binding/binding.pro
+++ b/examples/declarative/extending/binding/binding.pro
@@ -8,10 +8,10 @@ QT += declarative
SOURCES += main.cpp \
person.cpp \
birthdayparty.cpp \
- happybirthday.cpp
+ happybirthdaysong.cpp
HEADERS += person.h \
birthdayparty.h \
- happybirthday.h
+ happybirthdaysong.h
RESOURCES += binding.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro
diff --git a/examples/declarative/extending/binding/birthdayparty.cpp b/examples/declarative/extending/binding/birthdayparty.cpp
index e5be2b9..000bb1f 100644
--- a/examples/declarative/extending/binding/birthdayparty.cpp
+++ b/examples/declarative/extending/binding/birthdayparty.cpp
@@ -60,20 +60,20 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- if (c == m_celebrant) return;
- m_celebrant = c;
- emit celebrantChanged();
+ if (c == m_host) return;
+ m_host = c;
+ emit hostChanged();
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
@@ -97,12 +97,12 @@ void BirthdayParty::startParty()
emit partyStarted(time);
}
-QString BirthdayParty::speaker() const
+QString BirthdayParty::announcement() const
{
return QString();
}
-void BirthdayParty::setSpeaker(const QString &speak)
+void BirthdayParty::setAnnouncement(const QString &speak)
{
qWarning() << qPrintable(speak);
}
diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h
index 8486442..c3f033e 100644
--- a/examples/declarative/extending/binding/birthdayparty.h
+++ b/examples/declarative/extending/binding/birthdayparty.h
@@ -49,8 +49,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
public:
BirthdayPartyAttached(QObject *object);
@@ -63,43 +63,41 @@ signals:
private:
QDate m_rsvp;
};
-QML_DECLARE_TYPE(BirthdayPartyAttached)
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant NOTIFY celebrantChanged)
+ Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged)
// ![0]
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
- QString speaker() const;
- void setSpeaker(const QString &);
+ QString announcement() const;
+ void setAnnouncement(const QString &);
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
void startParty();
signals:
void partyStarted(const QTime &time);
- void celebrantChanged();
+ void hostChanged();
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(BirthdayParty)
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml
index b66bc86..82eb3be 100644
--- a/examples/declarative/extending/binding/example.qml
+++ b/examples/declarative/extending/binding/example.qml
@@ -4,9 +4,9 @@ import People 1.0
BirthdayParty {
id: theParty
- speaker: HappyBirthday { name: theParty.celebrant.name }
+ HappyBirthdaySong on announcement { name: theParty.host.name }
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
@@ -15,7 +15,7 @@ BirthdayParty {
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/binding/happybirthday.cpp b/examples/declarative/extending/binding/happybirthdaysong.cpp
index aa5f937..a40e7fb 100644
--- a/examples/declarative/extending/binding/happybirthday.cpp
+++ b/examples/declarative/extending/binding/happybirthdaysong.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include <QTimer>
-HappyBirthday::HappyBirthday(QObject *parent)
+HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
: QObject(parent), m_line(-1)
{
setName(QString());
@@ -50,17 +50,17 @@ HappyBirthday::HappyBirthday(QObject *parent)
timer->start(1000);
}
-void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
{
m_target = p;
}
-QString HappyBirthday::name() const
+QString HappyBirthdaySong::name() const
{
return m_name;
}
-void HappyBirthday::setName(const QString &name)
+void HappyBirthdaySong::setName(const QString &name)
{
if (m_name == name)
return;
@@ -77,7 +77,7 @@ void HappyBirthday::setName(const QString &name)
emit nameChanged();
}
-void HappyBirthday::advance()
+void HappyBirthdaySong::advance()
{
m_line = (m_line + 1) % m_lyrics.count();
diff --git a/examples/declarative/extending/binding/happybirthday.h b/examples/declarative/extending/binding/happybirthdaysong.h
index eb2da5e..e825b86 100644
--- a/examples/declarative/extending/binding/happybirthday.h
+++ b/examples/declarative/extending/binding/happybirthdaysong.h
@@ -38,21 +38,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef HAPPYBIRTHDAY_H
-#define HAPPYBIRTHDAY_H
+#ifndef HAPPYBIRTHDAYSONG_H
+#define HAPPYBIRTHDAYSONG_H
#include <QDeclarativePropertyValueSource>
#include <QDeclarativeProperty>
-#include <qdeclarative.h>
#include <QStringList>
-class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
{
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_INTERFACES(QDeclarativePropertyValueSource)
public:
- HappyBirthday(QObject *parent = 0);
+ HappyBirthdaySong(QObject *parent = 0);
virtual void setTarget(const QDeclarativeProperty &);
@@ -70,7 +70,6 @@ private:
QDeclarativeProperty m_target;
QString m_name;
};
-QML_DECLARE_TYPE(HappyBirthday);
-#endif // HAPPYBIRTHDAY_H
+#endif // HAPPYBIRTHDAYSONG_H
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp
index ce6c50d..2495676 100644
--- a/examples/declarative/extending/binding/main.cpp
+++ b/examples/declarative/extending/binding/main.cpp
@@ -43,7 +43,7 @@
#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include "person.h"
int main(int argc, char ** argv)
@@ -51,7 +51,7 @@ int main(int argc, char ** argv)
QCoreApplication app(argc, argv);
qmlRegisterType<BirthdayPartyAttached>();
qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
qmlRegisterType<ShoeDescription>();
qmlRegisterType<Person>();
qmlRegisterType<Boy>("People", 1,0, "Boy");
@@ -61,10 +61,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/extending/binding/person.h
index 2d4ec12..2a68da0 100644
--- a/examples/declarative/extending/binding/person.h
+++ b/examples/declarative/extending/binding/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
-Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
-Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
-Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
+ Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
public:
ShoeDescription(QObject *parent = 0);
@@ -74,13 +74,13 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
// ![0]
-Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
// ![0]
public:
Person(QObject *parent = 0);
@@ -96,20 +96,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/extending/coercion/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/coercion/birthdayparty.cpp
+++ b/examples/declarative/extending/coercion/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h
index fffd407..ee77e9a 100644
--- a/examples/declarative/extending/coercion/birthdayparty.h
+++ b/examples/declarative/extending/coercion/birthdayparty.h
@@ -42,30 +42,29 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![0]
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
-QML_DECLARE_TYPE(BirthdayParty);
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/extending/coercion/example.qml
index 64d26b0..7b45950 100644
--- a/examples/declarative/extending/coercion/example.qml
+++ b/examples/declarative/extending/coercion/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoeSize: 12
}
guests: [
- Boy { name: "Joan Hodges" },
+ Boy { name: "Leo Hodges" },
Boy { name: "Jack Smith" },
Girl { name: "Anne Brown" }
]
diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/extending/coercion/main.cpp
index 312aff9..2c7b545 100644
--- a/examples/declarative/extending/coercion/main.cpp
+++ b/examples/declarative/extending/coercion/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/extending/coercion/person.h
index 298ffb1..1c95da7 100644
--- a/examples/declarative/extending/coercion/person.h
+++ b/examples/declarative/extending/coercion/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -60,22 +60,24 @@ private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
+
// ![0]
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
+
// ![0]
#endif // PERSON_H
diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/extending/default/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/default/birthdayparty.cpp
+++ b/examples/declarative/extending/default/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/default/birthdayparty.h b/examples/declarative/extending/default/birthdayparty.h
index 49c20bd..9741040 100644
--- a/examples/declarative/extending/default/birthdayparty.h
+++ b/examples/declarative/extending/default/birthdayparty.h
@@ -42,31 +42,30 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
// ![0]
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
// ![0]
-QML_DECLARE_TYPE(BirthdayParty);
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/extending/default/example.qml
index 58035f9..c0f3cbb 100644
--- a/examples/declarative/extending/default/example.qml
+++ b/examples/declarative/extending/default/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoeSize: 12
}
- Boy { name: "Joan Hodges" }
+ Boy { name: "Leo Hodges" }
Boy { name: "Jack Smith" }
Girl { name: "Anne Brown" }
}
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp
index 06282ad..2ffd180 100644
--- a/examples/declarative/extending/default/main.cpp
+++ b/examples/declarative/extending/default/main.cpp
@@ -58,10 +58,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/default/person.h b/examples/declarative/extending/default/person.h
index b3eceaa..3e56860 100644
--- a/examples/declarative/extending/default/person.h
+++ b/examples/declarative/extending/default/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -60,20 +60,19 @@ private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/extending/extended/lineedit.cpp
index 417fbd9..0e521ec 100644
--- a/examples/declarative/extending/extended/lineedit.cpp
+++ b/examples/declarative/extending/extended/lineedit.cpp
@@ -102,4 +102,4 @@ void LineEditExtension::setBottomMargin(int m)
m_lineedit->setTextMargins(l, t, r, m);
}
-QML_DECLARE_TYPE(QLineEdit);
+
diff --git a/examples/declarative/extending/extended/lineedit.h b/examples/declarative/extending/extended/lineedit.h
index 9730b91..3a464b0 100644
--- a/examples/declarative/extending/extended/lineedit.h
+++ b/examples/declarative/extending/extended/lineedit.h
@@ -45,11 +45,11 @@
class LineEditExtension : public QObject
{
-Q_OBJECT
-Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged)
-Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged)
-Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged)
-Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged)
+ Q_OBJECT
+ Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged)
public:
LineEditExtension(QObject *);
diff --git a/examples/declarative/extending/extending.qmlproject b/examples/declarative/extending/extending.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/extending/extending.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/extending/grouped/birthdayparty.cpp b/examples/declarative/extending/grouped/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/grouped/birthdayparty.cpp
+++ b/examples/declarative/extending/grouped/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/grouped/birthdayparty.h b/examples/declarative/extending/grouped/birthdayparty.h
index 42439c4..31d21b2 100644
--- a/examples/declarative/extending/grouped/birthdayparty.h
+++ b/examples/declarative/extending/grouped/birthdayparty.h
@@ -42,29 +42,29 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
-QML_DECLARE_TYPE(BirthdayParty);
+
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/extending/grouped/example.qml
index 55912ed..91b7a06 100644
--- a/examples/declarative/extending/grouped/example.qml
+++ b/examples/declarative/extending/grouped/example.qml
@@ -2,13 +2,13 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
// ![1]
diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/extending/grouped/main.cpp
index b383a8b..baf32cf 100644
--- a/examples/declarative/extending/grouped/main.cpp
+++ b/examples/declarative/extending/grouped/main.cpp
@@ -59,10 +59,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/extending/grouped/person.h
index 5ea2348..a031e69 100644
--- a/examples/declarative/extending/grouped/person.h
+++ b/examples/declarative/extending/grouped/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -71,13 +71,13 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
// ![1]
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
// ![1]
public:
Person(QObject *parent = 0);
@@ -90,20 +90,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/properties/birthdayparty.cpp b/examples/declarative/extending/properties/birthdayparty.cpp
index 14fd6a3..27d17a1 100644
--- a/examples/declarative/extending/properties/birthdayparty.cpp
+++ b/examples/declarative/extending/properties/birthdayparty.cpp
@@ -41,19 +41,19 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
// ![0]
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/extending/properties/birthdayparty.h
index c4cb536..39ce9ba 100644
--- a/examples/declarative/extending/properties/birthdayparty.h
+++ b/examples/declarative/extending/properties/birthdayparty.h
@@ -42,36 +42,35 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
// ![0]
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
// ![1]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+ Q_PROPERTY(Person *host READ host WRITE setHost)
// ![1]
// ![2]
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![2]
// ![3]
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
-QML_DECLARE_TYPE(BirthdayParty);
// ![3]
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/extending/properties/example.qml
index 9594a84..35abdd6 100644
--- a/examples/declarative/extending/properties/example.qml
+++ b/examples/declarative/extending/properties/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Person {
+ host: Person {
name: "Bob Jones"
shoeSize: 12
}
guests: [
- Person { name: "Joan Hodges" },
+ Person { name: "Leo Hodges" },
Person { name: "Jack Smith" },
Person { name: "Anne Brown" }
]
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp
index 350f8bd..85e9584 100644
--- a/examples/declarative/extending/properties/main.cpp
+++ b/examples/declarative/extending/properties/main.cpp
@@ -56,8 +56,8 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
qWarning() << "They are inviting:";
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
diff --git a/examples/declarative/extending/properties/person.h b/examples/declarative/extending/properties/person.h
index 860a607..0029b09 100644
--- a/examples/declarative/extending/properties/person.h
+++ b/examples/declarative/extending/properties/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -60,6 +60,5 @@ private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
#endif // PERSON_H
diff --git a/examples/declarative/extending/signal/birthdayparty.cpp b/examples/declarative/extending/signal/birthdayparty.cpp
index 65ff530..740c8c9 100644
--- a/examples/declarative/extending/signal/birthdayparty.cpp
+++ b/examples/declarative/extending/signal/birthdayparty.cpp
@@ -57,18 +57,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/extending/signal/birthdayparty.h
index bcdc513..ae4dd39 100644
--- a/examples/declarative/extending/signal/birthdayparty.h
+++ b/examples/declarative/extending/signal/birthdayparty.h
@@ -48,8 +48,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -59,19 +59,18 @@ public:
private:
QDate m_rsvp;
};
-QML_DECLARE_TYPE(BirthdayPartyAttached)
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
@@ -86,11 +85,9 @@ signals:
// ![0]
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
-
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(BirthdayParty)
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml
index c7d4792..83d6a23 100644
--- a/examples/declarative/extending/signal/example.qml
+++ b/examples/declarative/extending/signal/example.qml
@@ -5,13 +5,13 @@ BirthdayParty {
onPartyStarted: console.log("This party started rockin' at " + time);
// ![0]
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp
index 1b23a46..453f688 100644
--- a/examples/declarative/extending/signal/main.cpp
+++ b/examples/declarative/extending/signal/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/signal/person.h b/examples/declarative/extending/signal/person.h
index 08caebf..2f444c5 100644
--- a/examples/declarative/extending/signal/person.h
+++ b/examples/declarative/extending/signal/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -71,12 +71,12 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,20 +88,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/valuesource/birthdayparty.cpp b/examples/declarative/extending/valuesource/birthdayparty.cpp
index 99d98be..b915f4f 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.cpp
+++ b/examples/declarative/extending/valuesource/birthdayparty.cpp
@@ -57,18 +57,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
@@ -92,12 +92,12 @@ void BirthdayParty::startParty()
emit partyStarted(time);
}
-QString BirthdayParty::speaker() const
+QString BirthdayParty::announcement() const
{
return QString();
}
-void BirthdayParty::setSpeaker(const QString &speak)
+void BirthdayParty::setAnnouncement(const QString &speak)
{
qWarning() << qPrintable(speak);
}
diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/extending/valuesource/birthdayparty.h
index 819a200..5f25781 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.h
+++ b/examples/declarative/extending/valuesource/birthdayparty.h
@@ -49,8 +49,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -60,30 +60,28 @@ public:
private:
QDate m_rsvp;
};
-QML_DECLARE_TYPE(BirthdayPartyAttached)
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![0]
-Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
+ Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
// ![0]
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
-
- QString speaker() const;
- void setSpeaker(const QString &);
+ QString announcement() const;
+ void setAnnouncement(const QString &);
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
@@ -92,11 +90,9 @@ signals:
void partyStarted(const QTime &time);
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
-
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(BirthdayParty)
#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml
index 7cdf8c0..5b8c8af 100644
--- a/examples/declarative/extending/valuesource/example.qml
+++ b/examples/declarative/extending/valuesource/example.qml
@@ -2,19 +2,19 @@ import People 1.0
// ![0]
BirthdayParty {
- speaker: HappyBirthday { name: "Bob Jones" }
+ HappyBirthdaySong on announcement { name: "Bob Jones" }
// ![0]
onPartyStarted: console.log("This party started rockin' at " + time);
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/valuesource/happybirthday.cpp b/examples/declarative/extending/valuesource/happybirthdaysong.cpp
index 0dbbd6e..8ea5c2b 100644
--- a/examples/declarative/extending/valuesource/happybirthday.cpp
+++ b/examples/declarative/extending/valuesource/happybirthdaysong.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include <QTimer>
-HappyBirthday::HappyBirthday(QObject *parent)
+HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
: QObject(parent), m_line(-1)
{
setName(QString());
@@ -50,17 +50,17 @@ HappyBirthday::HappyBirthday(QObject *parent)
timer->start(1000);
}
-void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
{
m_target = p;
}
-QString HappyBirthday::name() const
+QString HappyBirthdaySong::name() const
{
return m_name;
}
-void HappyBirthday::setName(const QString &name)
+void HappyBirthdaySong::setName(const QString &name)
{
m_name = name;
@@ -72,7 +72,7 @@ void HappyBirthday::setName(const QString &name)
m_lyrics << "";
}
-void HappyBirthday::advance()
+void HappyBirthdaySong::advance()
{
m_line = (m_line + 1) % m_lyrics.count();
diff --git a/examples/declarative/extending/valuesource/happybirthday.h b/examples/declarative/extending/valuesource/happybirthdaysong.h
index b48c012..3d07909 100644
--- a/examples/declarative/extending/valuesource/happybirthday.h
+++ b/examples/declarative/extending/valuesource/happybirthdaysong.h
@@ -38,8 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef HAPPYBIRTHDAY_H
-#define HAPPYBIRTHDAY_H
+#ifndef HAPPYBIRTHDAYSONG_H
+#define HAPPYBIRTHDAYSONG_H
#include <QDeclarativePropertyValueSource>
#include <QDeclarativeProperty>
@@ -48,14 +48,15 @@
#include <QStringList>
// ![0]
-class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
{
-Q_OBJECT
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueSource)
// ![0]
-Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QString name READ name WRITE setName)
// ![1]
public:
- HappyBirthday(QObject *parent = 0);
+ HappyBirthdaySong(QObject *parent = 0);
virtual void setTarget(const QDeclarativeProperty &);
// ![1]
@@ -74,7 +75,6 @@ private:
// ![2]
};
// ![2]
-QML_DECLARE_TYPE(HappyBirthday);
-#endif // HAPPYBIRTHDAY_H
+#endif // HAPPYBIRTHDAYSONG_H
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp
index 2574917..00840ee 100644
--- a/examples/declarative/extending/valuesource/main.cpp
+++ b/examples/declarative/extending/valuesource/main.cpp
@@ -43,7 +43,7 @@
#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include "person.h"
int main(int argc, char ** argv)
@@ -52,7 +52,7 @@ int main(int argc, char ** argv)
qmlRegisterType<BirthdayPartyAttached>();
qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
qmlRegisterType<ShoeDescription>();
qmlRegisterType<Person>();
qmlRegisterType<Boy>("People", 1,0, "Boy");
@@ -62,10 +62,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/valuesource/person.h b/examples/declarative/extending/valuesource/person.h
index 08caebf..2f444c5 100644
--- a/examples/declarative/extending/valuesource/person.h
+++ b/examples/declarative/extending/valuesource/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -71,12 +71,12 @@ private:
QString m_brand;
qreal m_price;
};
-QML_DECLARE_TYPE(ShoeDescription);
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,20 +88,19 @@ private:
QString m_name;
ShoeDescription m_shoe;
};
-QML_DECLARE_TYPE(Person);
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Boy);
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
-QML_DECLARE_TYPE(Girl);
#endif // PERSON_H
diff --git a/examples/declarative/extending/valuesource/valuesource.pro b/examples/declarative/extending/valuesource/valuesource.pro
index d3409b6..0626c98 100644
--- a/examples/declarative/extending/valuesource/valuesource.pro
+++ b/examples/declarative/extending/valuesource/valuesource.pro
@@ -8,10 +8,10 @@ QT += declarative
SOURCES += main.cpp \
person.cpp \
birthdayparty.cpp \
- happybirthday.cpp
+ happybirthdaysong.cpp
HEADERS += person.h \
birthdayparty.h \
- happybirthday.h
+ happybirthdaysong.h
RESOURCES += valuesource.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro
diff --git a/examples/declarative/fillmode/content/QtLogo.qml b/examples/declarative/fillmode/content/QtLogo.qml
new file mode 100644
index 0000000..6dd714d
--- /dev/null
+++ b/examples/declarative/fillmode/content/QtLogo.qml
@@ -0,0 +1,30 @@
+import Qt 4.7
+
+Item {
+ id: qtLogo
+
+ property alias fillMode: image.fillMode
+ property alias label: labelText.text
+
+ width: ((window.width - 20) - ((grid.columns - 1) * grid.spacing)) / grid.columns
+ height: ((window.height - 20) - ((grid.rows - 1) * grid.spacing)) / grid.rows
+
+ Column {
+ anchors.fill: parent
+
+ Rectangle {
+ height: qtLogo.height - 30; width: qtLogo.width
+ border.color: "black"; clip: true
+
+ Image {
+ id: image
+ anchors.fill: parent; smooth: true; source: "qt-logo.png"
+ }
+ }
+
+ Text {
+ id: labelText; anchors.horizontalCenter: parent.horizontalCenter
+ height: 30; verticalAlignment: Text.AlignVCenter
+ }
+ }
+}
diff --git a/examples/declarative/fillmode/content/qt-logo.png b/examples/declarative/fillmode/content/qt-logo.png
new file mode 100644
index 0000000..14ddf2a
--- /dev/null
+++ b/examples/declarative/fillmode/content/qt-logo.png
Binary files differ
diff --git a/examples/declarative/fillmode/face.png b/examples/declarative/fillmode/face.png
deleted file mode 100644
index 9623b1a..0000000
--- a/examples/declarative/fillmode/face.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
index e47fc9b..e5b0336 100644
--- a/examples/declarative/fillmode/fillmode.qml
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -1,44 +1,22 @@
import Qt 4.7
+import "content"
-Image {
- width: 400
- height: 250
- source: "face.png"
+Rectangle {
+ id: window
- SequentialAnimation on fillMode {
- loops: Animation.Infinite
- PropertyAction { value: Image.Stretch }
- PropertyAction { target: label; property: "text"; value: "Stretch" }
- PauseAnimation { duration: 1000 }
- PropertyAction { value: Image.PreserveAspectFit }
- PropertyAction { target: label; property: "text"; value: "PreserveAspectFit" }
- PauseAnimation { duration: 1000 }
- PropertyAction { value: Image.PreserveAspectCrop }
- PropertyAction { target: label; property: "text"; value: "PreserveAspectCrop" }
- PauseAnimation { duration: 1000 }
- PropertyAction { value: Image.Tile }
- PropertyAction { target: label; property: "text"; value: "Tile" }
- PauseAnimation { duration: 1000 }
- PropertyAction { value: Image.TileHorizontally }
- PropertyAction { target: label; property: "text"; value: "TileHorizontally" }
- PauseAnimation { duration: 1000 }
- PropertyAction { value: Image.TileVertically }
- PropertyAction { target: label; property: "text"; value: "TileVertically" }
- PauseAnimation { duration: 1000 }
- }
+ width: 800; height: 480
+ color: "#cdcdcd"
- Text {
- id: label
- font.pointSize: 24
- color: "blue"
- style: Text.Outline
- styleColor: "white"
- anchors.centerIn: parent
- }
+ Grid {
+ id: grid
+ anchors { fill: parent; topMargin: 10; leftMargin: 10; rightMargin: 10; bottomMargin: 10 }
+ columns: 3; rows: 2; spacing: 20
- Rectangle {
- border.color: "black"
- color: "transparent"
- anchors { fill: parent; rightMargin: 1; bottomMargin: 1 }
+ QtLogo { fillMode: Image.Stretch; label: "Stretch" }
+ QtLogo { fillMode: Image.PreserveAspectFit; label: "PreserveAspectFit" }
+ QtLogo { fillMode: Image.PreserveAspectCrop; label: "PreserveAspectCrop" }
+ QtLogo { fillMode: Image.Tile; label: "Tile" }
+ QtLogo { fillMode: Image.TileHorizontally; label: "TileHorizontally" }
+ QtLogo { fillMode: Image.TileVertically; label: "TileVertically" }
}
}
diff --git a/examples/declarative/fillmode/fillmode.qmlproject b/examples/declarative/fillmode/fillmode.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/fillmode/fillmode.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/flipable/flipable.qmlproject b/examples/declarative/flipable/flipable.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/flipable/flipable.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/focus/Core/GridMenu.qml b/examples/declarative/focus/Core/GridMenu.qml
index c37b17a..3f727fd 100644
--- a/examples/declarative/focus/Core/GridMenu.qml
+++ b/examples/declarative/focus/Core/GridMenu.qml
@@ -43,9 +43,7 @@ FocusScope {
onClicked: {
GridView.view.currentIndex = index
- container.focus = true
- gridMenu.focus = true
- mainView.focus = true
+ container.forceFocus()
}
}
diff --git a/examples/declarative/focus/Core/ListViewDelegate.qml b/examples/declarative/focus/Core/ListViewDelegate.qml
index 96324d7..14e2548 100644
--- a/examples/declarative/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/focus/Core/ListViewDelegate.qml
@@ -1,45 +1,40 @@
import Qt 4.7
-Component {
- Item {
- id: container
- x: 5; width: ListView.view.width - 10; height: 60
+Item {
+ id: container
+ x: 5; width: ListView.view.width - 10; height: 60
- Rectangle {
- id: content
- anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
- color: "transparent"
- smooth: true
- radius: 10
+ Rectangle {
+ id: content
+ anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
+ color: "transparent"
+ smooth: true
+ radius: 10
- Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
- Text {
- text: "List element " + (index + 1); color: "#193441"; font.bold: false; anchors.centerIn: parent
- font.pixelSize: 14
- }
+ Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
+ Text {
+ text: "List element " + (index + 1); color: "#193441"; font.bold: false; anchors.centerIn: parent
+ font.pixelSize: 14
}
+ }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ hoverEnabled: true
- onClicked: {
- ListView.view.currentIndex = index
- container.focus = true
- ListView.view.focus = true
- listViews.focus = true
- mainView.focus = true
- }
+ onClicked: {
+ ListView.view.currentIndex = index
+ container.forceFocus()
}
+ }
- states: State {
- name: "active"; when: container.focus == true
- PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
- }
+ states: State {
+ name: "active"; when: container.focus == true
+ PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
+ }
- transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
- }
+ transitions: Transition {
+ NumberAnimation { properties: "scale"; duration: 100 }
}
}
diff --git a/examples/declarative/focus/Core/ListViews.qml b/examples/declarative/focus/Core/ListViews.qml
index f4384c8..089f821 100644
--- a/examples/declarative/focus/Core/ListViews.qml
+++ b/examples/declarative/focus/Core/ListViews.qml
@@ -10,7 +10,7 @@ FocusScope {
y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
focus: true
KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
@@ -22,7 +22,7 @@ FocusScope {
id: list2
y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
@@ -34,7 +34,7 @@ FocusScope {
id: list3
y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list2
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
diff --git a/examples/declarative/focus/focus.qmlproject b/examples/declarative/focus/focus.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/focus/focus.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/fonts/fonts.qmlproject b/examples/declarative/fonts/fonts.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/fonts/fonts.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/gestures/gestures.qmlproject b/examples/declarative/gestures/gestures.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/gestures/gestures.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/gridview/gridview.qmlproject b/examples/declarative/gridview/gridview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/gridview/gridview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/imageprovider/imageprovider.qmlproject b/examples/declarative/imageprovider/imageprovider.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/imageprovider/imageprovider.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/images/images.qmlproject b/examples/declarative/images/images.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/images/images.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/layouts/layouts.qmlproject b/examples/declarative/layouts/layouts.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/layouts/layouts.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/listmodel-threaded/dataloader.js b/examples/declarative/listmodel-threaded/dataloader.js
index eac7478..d720f09 100644
--- a/examples/declarative/listmodel-threaded/dataloader.js
+++ b/examples/declarative/listmodel-threaded/dataloader.js
@@ -1,14 +1,9 @@
// ![0]
WorkerScript.onMessage = function(msg) {
- console.log("Worker told to", msg.action);
-
if (msg.action == 'appendCurrentTime') {
var data = {'time': new Date().toTimeString()};
msg.model.append(data);
msg.model.sync(); // updates the changes to the list
-
- var msgToSend = {'msg': 'Model updated!'};
- WorkerScript.sendMessage(msgToSend);
}
}
// ![0]
diff --git a/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject b/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/listmodel-threaded/timedisplay.qml b/examples/declarative/listmodel-threaded/timedisplay.qml
index 80ac9fa..bad7010 100644
--- a/examples/declarative/listmodel-threaded/timedisplay.qml
+++ b/examples/declarative/listmodel-threaded/timedisplay.qml
@@ -15,9 +15,6 @@ ListView {
WorkerScript {
id: worker
source: "dataloader.js"
- onMessage: {
- console.log("Worker said", messageObject.msg);
- }
}
Timer {
diff --git a/examples/declarative/listview/listview.qmlproject b/examples/declarative/listview/listview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/listview/listview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/mousearea/mousearea.qmlproject b/examples/declarative/mousearea/mousearea.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/mousearea/mousearea.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.qmlproject b/examples/declarative/objectlistmodel/objectlistmodel.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/objectlistmodel/objectlistmodel.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/package/package.qmlproject b/examples/declarative/package/package.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/package/package.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/parallax/parallax.qmlproject b/examples/declarative/parallax/parallax.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/parallax/parallax.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
index 8f5f290..4b38d45 100644
--- a/examples/declarative/parallax/qml/ParallaxView.qml
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -21,7 +21,7 @@ Item {
onCurrentIndexChanged: root.currentIndex = currentIndex
orientation: "Horizontal"
- overShoot: false
+ boundsBehavior: Flickable.DragOverBounds
anchors.fill: parent
model: VisualItemModel { id: visualModel }
diff --git a/examples/declarative/plugins/README b/examples/declarative/plugins/README
index 3ae256d..fe519f8 100644
--- a/examples/declarative/plugins/README
+++ b/examples/declarative/plugins/README
@@ -5,5 +5,5 @@ by a C++ plugin (providing the "Time" type), and by QML files (providing the
To run:
make install
- qml plugins.qml
+ qml -I . plugins.qml
diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/plugins/plugins.pro
index c409d39..b501ae3 100644
--- a/examples/declarative/plugins/plugins.pro
+++ b/examples/declarative/plugins/plugins.pro
@@ -3,7 +3,6 @@ DESTDIR = com/nokia/TimeExample
TARGET = qtimeexampleqmlplugin
CONFIG += qt plugin
QT += declarative
-VERSION = 1.0.0
SOURCES += plugin.cpp
diff --git a/examples/declarative/plugins/plugins.qmlproject b/examples/declarative/plugins/plugins.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/plugins/plugins.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/progressbar/progressbar.qmlproject b/examples/declarative/progressbar/progressbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/progressbar/progressbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/proxywidgets/proxywidgets.cpp b/examples/declarative/proxywidgets/proxywidgets.cpp
index 47d0cb9..067eb2c 100644
--- a/examples/declarative/proxywidgets/proxywidgets.cpp
+++ b/examples/declarative/proxywidgets/proxywidgets.cpp
@@ -94,6 +94,4 @@ public:
#include "proxywidgets.moc"
-QML_DECLARE_TYPE(MyPushButton)
-
Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin);
diff --git a/examples/declarative/proxywidgets/proxywidgets.pro b/examples/declarative/proxywidgets/proxywidgets.pro
index eb85191..cb07d80 100644
--- a/examples/declarative/proxywidgets/proxywidgets.pro
+++ b/examples/declarative/proxywidgets/proxywidgets.pro
@@ -3,7 +3,6 @@ DESTDIR = ProxyWidgets
TARGET = proxywidgetsplugin
CONFIG += qt plugin
QT += declarative
-VERSION = 1.0.0
SOURCES += proxywidgets.cpp
diff --git a/examples/declarative/proxywidgets/proxywidgets.qmlproject b/examples/declarative/proxywidgets/proxywidgets.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/proxywidgets/proxywidgets.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/scrollbar/scrollbar.qmlproject b/examples/declarative/scrollbar/scrollbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/scrollbar/scrollbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/searchbox/searchbox.qmlproject b/examples/declarative/searchbox/searchbox.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/searchbox/searchbox.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/slideswitch/slideswitch.qmlproject b/examples/declarative/slideswitch/slideswitch.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/slideswitch/slideswitch.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/sql/sql.qmlproject b/examples/declarative/sql/sql.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/sql/sql.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/states/states.qmlproject b/examples/declarative/states/states.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/states/states.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/stringlistmodel/main.cpp b/examples/declarative/stringlistmodel/main.cpp
new file mode 100644
index 0000000..abbffa7
--- /dev/null
+++ b/examples/declarative/stringlistmodel/main.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include <qdeclarativeengine.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarative.h>
+#include <qdeclarativeitem.h>
+#include <qdeclarativeview.h>
+
+
+/*
+ This example illustrates exposing a QStringList as a
+ model in QML
+*/
+
+int main(int argc, char ** argv)
+{
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ QStringList dataList;
+ dataList.append("Item 1");
+ dataList.append("Item 2");
+ dataList.append("Item 3");
+ dataList.append("Item 4");
+
+ QDeclarativeContext *ctxt = view.rootContext();
+ ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
+
+ view.setSource(QUrl("qrc:view.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/examples/declarative/stringlistmodel/stringlistmodel.pro b/examples/declarative/stringlistmodel/stringlistmodel.pro
new file mode 100644
index 0000000..23dc481
--- /dev/null
+++ b/examples/declarative/stringlistmodel/stringlistmodel.pro
@@ -0,0 +1,9 @@
+TEMPLATE = app
+TARGET = stringlistmodel
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp
+RESOURCES += stringlistmodel.qrc
diff --git a/examples/declarative/stringlistmodel/stringlistmodel.qrc b/examples/declarative/stringlistmodel/stringlistmodel.qrc
new file mode 100644
index 0000000..17e9301
--- /dev/null
+++ b/examples/declarative/stringlistmodel/stringlistmodel.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>view.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/stringlistmodel/view.qml b/examples/declarative/stringlistmodel/view.qml
new file mode 100644
index 0000000..41c03d9
--- /dev/null
+++ b/examples/declarative/stringlistmodel/view.qml
@@ -0,0 +1,15 @@
+import Qt 4.7
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ Text { text: modelData }
+ }
+ }
+}
diff --git a/examples/declarative/tabwidget/tabwidget.qmlproject b/examples/declarative/tabwidget/tabwidget.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tabwidget/tabwidget.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tic-tac-toe/content/pics/board.png b/examples/declarative/tic-tac-toe/content/pics/board.png
index 29118a9..7e5b7ba 100644
--- a/examples/declarative/tic-tac-toe/content/pics/board.png
+++ b/examples/declarative/tic-tac-toe/content/pics/board.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml
index a535235..a23654b 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml
@@ -1,9 +1,9 @@
//![0]
import Qt 4.7
-Item {
+Item {
id: block
-
+
Image {
id: img
anchors.fill: parent
diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml
index e8034ac..e84b1ce 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml
@@ -18,9 +18,9 @@ Rectangle {
GradientStop {
position: 0.0
color: {
- if (mouseArea.pressed)
+ if (mouseArea.pressed)
return activePalette.dark
- else
+ else
return activePalette.light
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml
index 88b3d79..4e71e60 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml
@@ -1,8 +1,8 @@
import Qt 4.7
-Item {
+Item {
id: block
-
+
Image {
id: img
anchors.fill: parent
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
index 8d322de5..737d886 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -17,9 +17,9 @@ Rectangle {
GradientStop {
position: 0.0
color: {
- if (mouseArea.pressed)
+ if (mouseArea.pressed)
return activePalette.dark
- else
+ else
return activePalette.light
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/declarative/tutorials/samegame/samegame2/samegame.js
index 9809c1d..81da31b 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.js
@@ -35,7 +35,7 @@ function startNewGame() {
function createBlock(column, row) {
if (component == null)
- component = createComponent("Block.qml");
+ component = Qt.createComponent("Block.qml");
// Note that if Block.qml was not a local file, component.isReady would be
// false and we should wait for the component's statusChanged() signal to
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
index 7a17d16..a7d1fba 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -31,7 +31,7 @@ Rectangle {
//![1]
Button {
anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
- text: "New Game"
+ text: "New Game"
onClicked: SameGame.startNewGame()
}
//![1]
diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml
index dd0fb48..7411259 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml
@@ -1,11 +1,11 @@
//![0]
import Qt 4.7
-Item {
+Item {
id: block
property int type: 0
-
+
Image {
id: img
diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml
index 8d322de5..737d886 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml
@@ -17,9 +17,9 @@ Rectangle {
GradientStop {
position: 0.0
color: {
- if (mouseArea.pressed)
+ if (mouseArea.pressed)
return activePalette.dark
- else
+ else
return activePalette.light
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
index be3a7b7..15b3b2f 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
@@ -21,7 +21,7 @@ Rectangle {
border.width: 1
opacity: 0
- Behavior on opacity {
+ Behavior on opacity {
NumberAnimation { duration: 1000 }
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js
index c12def7..eaf47d9 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js
@@ -32,7 +32,7 @@ function startNewGame() {
function createBlock(column, row) {
if (component == null)
- component = createComponent("Block.qml");
+ component = Qt.createComponent("Block.qml");
// Note that if Block.qml was not a local file, component.isReady would be
// false and we should wait for the component's statusChanged() signal to
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
index bc5f2f8..50f9d5d 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -52,7 +52,7 @@ Rectangle {
Button {
anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
- text: "New Game"
+ text: "New Game"
onClicked: SameGame.startNewGame()
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index d3a9df7..d6ef2e5 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -17,21 +17,21 @@ Item {
//![1]
//![2]
- Image {
+ Image {
id: img
anchors.fill: parent
source: {
if (type == 0)
return "../../shared/pics/redStone.png";
- else if (type == 1)
+ else if (type == 1)
return "../../shared/pics/blueStone.png";
else
return "../../shared/pics/greenStone.png";
}
opacity: 0
- Behavior on opacity {
+ Behavior on opacity {
NumberAnimation { properties:"opacity"; duration: 200 }
}
}
@@ -41,7 +41,7 @@ Item {
Particles {
id: particles
- width: 1; height: 1
+ width: 1; height: 1
anchors.centerIn: parent
emissionRate: 0
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
index 8d322de5..737d886 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
@@ -17,9 +17,9 @@ Rectangle {
GradientStop {
position: 0.0
color: {
- if (mouseArea.pressed)
+ if (mouseArea.pressed)
return activePalette.dark
- else
+ else
return activePalette.light
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index adb3f9e..6848534 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -20,7 +20,7 @@ Rectangle {
border.width: 1
opacity: 0
- Behavior on opacity {
+ Behavior on opacity {
NumberAnimation { duration: 1000 }
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index 7800b6e..c527f66 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -43,7 +43,7 @@ function startNewGame() {
function createBlock(column, row) {
if (component == null)
- component = createComponent("content/BoomBlock.qml");
+ component = Qt.createComponent("content/BoomBlock.qml");
// Note that if Block.qml was not a local file, component.isReady would be
// false and we should wait for the component's statusChanged() signal to
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index b2a490d..404af0a 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -73,7 +73,7 @@ Rectangle {
Button {
anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
- text: "New Game"
+ text: "New Game"
onClicked: SameGame.startNewGame()
}
diff --git a/examples/declarative/tutorials/tutorials.qmlproject b/examples/declarative/tutorials/tutorials.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tutorials/tutorials.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tvtennis/tvtennis.qmlproject b/examples/declarative/tvtennis/tvtennis.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tvtennis/tvtennis.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/velocity/velocity.qmlproject b/examples/declarative/velocity/velocity.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/velocity/velocity.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/webview/webview.qmlproject b/examples/declarative/webview/webview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/webview/webview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/workerscript/workerscript.qmlproject b/examples/declarative/workerscript/workerscript.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/workerscript/workerscript.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmldata/xmldata.qmlproject b/examples/declarative/xmldata/xmldata.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xmldata/xmldata.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject b/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index d5910e3..55f7b21 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,4 +1,9 @@
=============================================================================
+The changes below are pre Qt 4.7.0 RC
+
+Flickable: overShoot is replaced by boundsBehavior enumeration.
+
+=============================================================================
The changes below are pre Qt 4.7.0 beta
TextEdit: wrap property is replaced by wrapMode enumeration.
@@ -19,6 +24,8 @@ Animation: replace repeat with loops (loops: Animation.Infinite gives the old re
AnchorChanges: use natural form to specify anchors (anchors.left instead of left)
AnchorChanges: removed reset property. (reset: "left" should now be anchors.left: undefined)
PathView: snapPosition replaced by preferredHighlightBegin, preferredHighlightEnd
+createQmlObject: Moved to the Qt object, now use Qt.createQmlObject()
+createComponent: Moved to the Qt object, now use Qt.createComponent()
C++ API
-------
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index 9d9d1d0..34e73fd 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -60,12 +60,12 @@ class QDeclarativeDebugServer : public QObject
Q_DISABLE_COPY(QDeclarativeDebugServer)
public:
static QDeclarativeDebugServer *instance();
- void wait();
- void registerForStartNotification(QObject *object, const char *receiver);
+ void listen();
+ bool hasDebuggingClient() const;
private Q_SLOTS:
void readyRead();
- void registeredObjectDestroyed(QObject *object);
+ void newConnection();
private:
friend class QDeclarativeDebugService;
@@ -78,14 +78,14 @@ class QDeclarativeDebugServerPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QDeclarativeDebugServer)
public:
QDeclarativeDebugServerPrivate();
- void wait();
int port;
QTcpSocket *connection;
QPacketProtocol *protocol;
QHash<QString, QDeclarativeDebugService *> plugins;
QStringList enabledPlugins;
- QList<QPair<QObject*, QByteArray> > notifyClients;
+ QTcpServer *tcpServer;
+ bool gotHello;
};
class QDeclarativeDebugServicePrivate : public QObjectPrivate
@@ -99,56 +99,41 @@ public:
};
QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate()
-: connection(0), protocol(0)
+: connection(0), protocol(0), gotHello(false)
{
}
-void QDeclarativeDebugServerPrivate::wait()
+void QDeclarativeDebugServer::listen()
{
- Q_Q(QDeclarativeDebugServer);
- QTcpServer server;
-
- if (!server.listen(QHostAddress::Any, port)) {
- qWarning("QDeclarativeDebugServer: Unable to listen on port %d", port);
- return;
- }
-
- qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", port);
-
- for (int i=0; i<notifyClients.count(); i++) {
- if (!QMetaObject::invokeMethod(notifyClients[i].first, notifyClients[i].second)) {
- qWarning() << "QDeclarativeDebugServer: unable to call method" << notifyClients[i].second
- << "on object" << notifyClients[i].first << "to notify of debug server start";
- }
- }
- notifyClients.clear();
+ Q_D(QDeclarativeDebugServer);
- if (!server.waitForNewConnection(-1)) {
- qWarning("QDeclarativeDebugServer: Connection error");
- return;
- }
+ d->tcpServer = new QTcpServer(this);
+ QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection()));
+ if (d->tcpServer->listen(QHostAddress::Any, d->port))
+ qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port);
+ else
+ qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port);
+}
- connection = server.nextPendingConnection();
- connection->setParent(q);
- protocol = new QPacketProtocol(connection, q);
+void QDeclarativeDebugServer::newConnection()
+{
+ Q_D(QDeclarativeDebugServer);
- // ### Wait for hello
- while (!protocol->packetsAvailable()) {
- connection->waitForReadyRead();
- }
- QPacket hello = protocol->read();
- QString name;
- hello >> name >> enabledPlugins;
- if (name != QLatin1String("QDeclarativeDebugServer")) {
- qWarning("QDeclarativeDebugServer: Invalid hello message");
- delete protocol; delete connection; connection = 0; protocol = 0;
+ if (d->connection) {
+ qWarning("QDeclarativeDebugServer error: another client is already connected");
return;
}
- QObject::connect(protocol, SIGNAL(readyRead()), q, SLOT(readyRead()));
- q->readyRead();
+ d->connection = d->tcpServer->nextPendingConnection();
+ d->connection->setParent(this);
+ d->protocol = new QPacketProtocol(d->connection, this);
+ QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
+}
- qWarning("QDeclarativeDebugServer: Connection established");
+bool QDeclarativeDebugServer::hasDebuggingClient() const
+{
+ Q_D(const QDeclarativeDebugServer);
+ return d->gotHello;
}
QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
@@ -163,36 +148,15 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
bool ok = false;
int port = env.toInt(&ok);
- if (ok && port > 1024)
+ if (ok && port > 1024) {
server = new QDeclarativeDebugServer(port);
+ server->listen();
+ }
}
return server;
}
-void QDeclarativeDebugServer::wait()
-{
- Q_D(QDeclarativeDebugServer);
- d->wait();
-}
-
-void QDeclarativeDebugServer::registerForStartNotification(QObject *object, const char *methodName)
-{
- Q_D(QDeclarativeDebugServer);
- connect(object, SIGNAL(destroyed(QObject*)), SLOT(registeredObjectDestroyed(QObject*)));
- d->notifyClients.append(qMakePair(object, QByteArray(methodName)));
-}
-
-void QDeclarativeDebugServer::registeredObjectDestroyed(QObject *object)
-{
- Q_D(QDeclarativeDebugServer);
- QMutableListIterator<QPair<QObject*, QByteArray> > i(d->notifyClients);
- while (i.hasNext()) {
- if (i.next().first == object)
- i.remove();
- }
-}
-
QDeclarativeDebugServer::QDeclarativeDebugServer(int port)
: QObject(*(new QDeclarativeDebugServerPrivate))
{
@@ -204,6 +168,23 @@ void QDeclarativeDebugServer::readyRead()
{
Q_D(QDeclarativeDebugServer);
+ if (!d->gotHello) {
+ QPacket hello = d->protocol->read();
+ QString name;
+ hello >> name >> d->enabledPlugins;
+ if (name != QLatin1String("QDeclarativeDebugServer")) {
+ qWarning("QDeclarativeDebugServer: Invalid hello message");
+ QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
+ d->protocol->deleteLater();
+ d->protocol = 0;
+ d->connection->deleteLater();
+ d->connection = 0;
+ return;
+ }
+ d->gotHello = true;
+ qWarning("QDeclarativeDebugServer: Connection established");
+ }
+
QString debugServer(QLatin1String("QDeclarativeDebugServer"));
while (d->protocol->packetsAvailable()) {
@@ -375,6 +356,12 @@ bool QDeclarativeDebugService::isDebuggingEnabled()
return QDeclarativeDebugServer::instance() != 0;
}
+bool QDeclarativeDebugService::hasDebuggingClient()
+{
+ return QDeclarativeDebugServer::instance() != 0
+ && QDeclarativeDebugServer::instance()->hasDebuggingClient();
+}
+
QString QDeclarativeDebugService::objectToString(QObject *obj)
{
if(!obj)
@@ -390,16 +377,6 @@ QString QDeclarativeDebugService::objectToString(QObject *obj)
return rv;
}
-void QDeclarativeDebugService::waitForClients()
-{
- QDeclarativeDebugServer::instance()->wait();
-}
-
-void QDeclarativeDebugService::notifyOnServerStart(QObject *object, const char *receiver)
-{
- QDeclarativeDebugServer::instance()->registerForStartNotification(object, receiver);
-}
-
void QDeclarativeDebugService::sendMessage(const QByteArray &message)
{
Q_D(QDeclarativeDebugService);
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h
index 498edf3..c461ddf 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p.h
@@ -68,19 +68,16 @@ public:
static int idForObject(QObject *);
static QObject *objectForId(int);
- static bool isDebuggingEnabled();
static QString objectToString(QObject *obj);
- static void waitForClients();
-
- static void notifyOnServerStart(QObject *object, const char *receiver);
+ static bool isDebuggingEnabled();
+ static bool hasDebuggingClient();
protected:
virtual void enabledChanged(bool);
virtual void messageReceived(const QByteArray &);
private:
- void registerForStartNotification(QObject *object, const char *methodName);
friend class QDeclarativeDebugServer;
};
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index ad7ccb5..d420595 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -5,7 +5,6 @@ HEADERS += \
$$PWD/qdeclarativeanchors_p.h \
$$PWD/qdeclarativeanchors_p_p.h \
$$PWD/qdeclarativeevents_p_p.h \
- $$PWD/qdeclarativeeffects_p.h \
$$PWD/qdeclarativeflickable_p.h \
$$PWD/qdeclarativeflickable_p_p.h \
$$PWD/qdeclarativeflipable_p.h \
@@ -50,7 +49,6 @@ HEADERS += \
$$PWD/qdeclarativelistview_p.h \
$$PWD/qdeclarativelayoutitem_p.h \
$$PWD/qdeclarativeitemchangelistener_p.h \
- $$PWD/qdeclarativeeffects.cpp \
$$PWD/qdeclarativegraphicswidget_p.h
SOURCES += \
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index 96d0867..f15316b 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -221,31 +221,31 @@ void QDeclarativeAnchorsPrivate::clearItem(QGraphicsObject *item)
centerIn = 0;
if (left.item == item) {
left.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasLeftAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::LeftAnchor;
}
if (right.item == item) {
right.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasRightAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::RightAnchor;
}
if (top.item == item) {
top.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasTopAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::TopAnchor;
}
if (bottom.item == item) {
bottom.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasBottomAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::BottomAnchor;
}
if (vCenter.item == item) {
vCenter.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasVCenterAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::VCenterAnchor;
}
if (hCenter.item == item) {
hCenter.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasHCenterAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::HCenterAnchor;
}
if (baseline.item == item) {
baseline.item = 0;
- usedAnchors &= ~QDeclarativeAnchors::HasBaselineAnchor;
+ usedAnchors &= ~QDeclarativeAnchors::BaselineAnchor;
}
}
@@ -495,13 +495,13 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
if (updatingVerticalAnchor < 2) {
++updatingVerticalAnchor;
QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
- if (usedAnchors & QDeclarativeAnchors::HasTopAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::TopAnchor) {
//Handle stretching
bool invalid = true;
int height = 0;
- if (usedAnchors & QDeclarativeAnchors::HasBottomAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::BottomAnchor) {
invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QDeclarativeAnchorLine::Top, height);
- } else if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::VCenterAnchor) {
invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QDeclarativeAnchorLine::Top, height);
height *= 2;
}
@@ -514,9 +514,9 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
} else if (top.item->parentItem() == item->parentItem()) {
setItemY(position(top.item, top.anchorLine) + topMargin);
}
- } else if (usedAnchors & QDeclarativeAnchors::HasBottomAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::BottomAnchor) {
//Handle stretching (top + bottom case is handled above)
- if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::VCenterAnchor) {
int height = 0;
bool invalid = calcStretch(vCenter, bottom, vCenterOffset, -bottomMargin,
QDeclarativeAnchorLine::Top, height);
@@ -530,7 +530,7 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
} else if (bottom.item->parentItem() == item->parentItem()) {
setItemY(position(bottom.item, bottom.anchorLine) - itemPrivate->height() - bottomMargin);
}
- } else if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::VCenterAnchor) {
//(stetching handled above)
//Handle vCenter
@@ -540,7 +540,7 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
} else if (vCenter.item->parentItem() == item->parentItem()) {
setItemY(position(vCenter.item, vCenter.anchorLine) - itemPrivate->height()/2 + vCenterOffset);
}
- } else if (usedAnchors & QDeclarativeAnchors::HasBaselineAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::BaselineAnchor) {
//Handle baseline
if (baseline.item == item->parentItem()) {
if (itemPrivate->isDeclarativeItem)
@@ -567,13 +567,13 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
if (updatingHorizontalAnchor < 2) {
++updatingHorizontalAnchor;
QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
- if (usedAnchors & QDeclarativeAnchors::HasLeftAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::LeftAnchor) {
//Handle stretching
bool invalid = true;
int width = 0;
- if (usedAnchors & QDeclarativeAnchors::HasRightAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
invalid = calcStretch(left, right, leftMargin, -rightMargin, QDeclarativeAnchorLine::Left, width);
- } else if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QDeclarativeAnchorLine::Left, width);
width *= 2;
}
@@ -586,9 +586,9 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
} else if (left.item->parentItem() == item->parentItem()) {
setItemX(position(left.item, left.anchorLine) + leftMargin);
}
- } else if (usedAnchors & QDeclarativeAnchors::HasRightAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
//Handle stretching (left + right case is handled in updateLeftAnchor)
- if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
int width = 0;
bool invalid = calcStretch(hCenter, right, hCenterOffset, -rightMargin,
QDeclarativeAnchorLine::Left, width);
@@ -602,7 +602,7 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
} else if (right.item->parentItem() == item->parentItem()) {
setItemX(position(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
}
- } else if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
//Handle hCenter
if (hCenter.item == item->parentItem()) {
setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset);
@@ -630,10 +630,10 @@ void QDeclarativeAnchors::setTop(const QDeclarativeAnchorLine &edge)
if (!d->checkVAnchorValid(edge) || d->top == edge)
return;
- d->usedAnchors |= HasTopAnchor;
+ d->usedAnchors |= TopAnchor;
if (!d->checkVValid()) {
- d->usedAnchors &= ~HasTopAnchor;
+ d->usedAnchors &= ~TopAnchor;
return;
}
@@ -647,7 +647,7 @@ void QDeclarativeAnchors::setTop(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetTop()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasTopAnchor;
+ d->usedAnchors &= ~TopAnchor;
d->remDepend(d->top.item);
d->top = QDeclarativeAnchorLine();
emit topChanged();
@@ -666,10 +666,10 @@ void QDeclarativeAnchors::setBottom(const QDeclarativeAnchorLine &edge)
if (!d->checkVAnchorValid(edge) || d->bottom == edge)
return;
- d->usedAnchors |= HasBottomAnchor;
+ d->usedAnchors |= BottomAnchor;
if (!d->checkVValid()) {
- d->usedAnchors &= ~HasBottomAnchor;
+ d->usedAnchors &= ~BottomAnchor;
return;
}
@@ -683,7 +683,7 @@ void QDeclarativeAnchors::setBottom(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetBottom()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasBottomAnchor;
+ d->usedAnchors &= ~BottomAnchor;
d->remDepend(d->bottom.item);
d->bottom = QDeclarativeAnchorLine();
emit bottomChanged();
@@ -702,10 +702,10 @@ void QDeclarativeAnchors::setVerticalCenter(const QDeclarativeAnchorLine &edge)
if (!d->checkVAnchorValid(edge) || d->vCenter == edge)
return;
- d->usedAnchors |= HasVCenterAnchor;
+ d->usedAnchors |= VCenterAnchor;
if (!d->checkVValid()) {
- d->usedAnchors &= ~HasVCenterAnchor;
+ d->usedAnchors &= ~VCenterAnchor;
return;
}
@@ -719,7 +719,7 @@ void QDeclarativeAnchors::setVerticalCenter(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetVerticalCenter()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasVCenterAnchor;
+ d->usedAnchors &= ~VCenterAnchor;
d->remDepend(d->vCenter.item);
d->vCenter = QDeclarativeAnchorLine();
emit verticalCenterChanged();
@@ -738,10 +738,10 @@ void QDeclarativeAnchors::setBaseline(const QDeclarativeAnchorLine &edge)
if (!d->checkVAnchorValid(edge) || d->baseline == edge)
return;
- d->usedAnchors |= HasBaselineAnchor;
+ d->usedAnchors |= BaselineAnchor;
if (!d->checkVValid()) {
- d->usedAnchors &= ~HasBaselineAnchor;
+ d->usedAnchors &= ~BaselineAnchor;
return;
}
@@ -755,7 +755,7 @@ void QDeclarativeAnchors::setBaseline(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetBaseline()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasBaselineAnchor;
+ d->usedAnchors &= ~BaselineAnchor;
d->remDepend(d->baseline.item);
d->baseline = QDeclarativeAnchorLine();
emit baselineChanged();
@@ -774,10 +774,10 @@ void QDeclarativeAnchors::setLeft(const QDeclarativeAnchorLine &edge)
if (!d->checkHAnchorValid(edge) || d->left == edge)
return;
- d->usedAnchors |= HasLeftAnchor;
+ d->usedAnchors |= LeftAnchor;
if (!d->checkHValid()) {
- d->usedAnchors &= ~HasLeftAnchor;
+ d->usedAnchors &= ~LeftAnchor;
return;
}
@@ -791,7 +791,7 @@ void QDeclarativeAnchors::setLeft(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetLeft()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasLeftAnchor;
+ d->usedAnchors &= ~LeftAnchor;
d->remDepend(d->left.item);
d->left = QDeclarativeAnchorLine();
emit leftChanged();
@@ -810,10 +810,10 @@ void QDeclarativeAnchors::setRight(const QDeclarativeAnchorLine &edge)
if (!d->checkHAnchorValid(edge) || d->right == edge)
return;
- d->usedAnchors |= HasRightAnchor;
+ d->usedAnchors |= RightAnchor;
if (!d->checkHValid()) {
- d->usedAnchors &= ~HasRightAnchor;
+ d->usedAnchors &= ~RightAnchor;
return;
}
@@ -827,7 +827,7 @@ void QDeclarativeAnchors::setRight(const QDeclarativeAnchorLine &edge)
void QDeclarativeAnchors::resetRight()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasRightAnchor;
+ d->usedAnchors &= ~RightAnchor;
d->remDepend(d->right.item);
d->right = QDeclarativeAnchorLine();
emit rightChanged();
@@ -846,10 +846,10 @@ void QDeclarativeAnchors::setHorizontalCenter(const QDeclarativeAnchorLine &edge
if (!d->checkHAnchorValid(edge) || d->hCenter == edge)
return;
- d->usedAnchors |= HasHCenterAnchor;
+ d->usedAnchors |= HCenterAnchor;
if (!d->checkHValid()) {
- d->usedAnchors &= ~HasHCenterAnchor;
+ d->usedAnchors &= ~HCenterAnchor;
return;
}
@@ -863,7 +863,7 @@ void QDeclarativeAnchors::setHorizontalCenter(const QDeclarativeAnchorLine &edge
void QDeclarativeAnchors::resetHorizontalCenter()
{
Q_D(QDeclarativeAnchors);
- d->usedAnchors &= ~HasHCenterAnchor;
+ d->usedAnchors &= ~HCenterAnchor;
d->remDepend(d->hCenter.item);
d->hCenter = QDeclarativeAnchorLine();
emit horizontalCenterChanged();
@@ -1025,7 +1025,7 @@ void QDeclarativeAnchors::setBaselineOffset(qreal offset)
emit baselineOffsetChanged();
}
-QDeclarativeAnchors::UsedAnchors QDeclarativeAnchors::usedAnchors() const
+QDeclarativeAnchors::Anchors QDeclarativeAnchors::usedAnchors() const
{
Q_D(const QDeclarativeAnchors);
return d->usedAnchors;
@@ -1033,9 +1033,9 @@ QDeclarativeAnchors::UsedAnchors QDeclarativeAnchors::usedAnchors() const
bool QDeclarativeAnchorsPrivate::checkHValid() const
{
- if (usedAnchors & QDeclarativeAnchors::HasLeftAnchor &&
- usedAnchors & QDeclarativeAnchors::HasRightAnchor &&
- usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::LeftAnchor &&
+ usedAnchors & QDeclarativeAnchors::RightAnchor &&
+ usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
qmlInfo(item) << QDeclarativeAnchors::tr("Cannot specify left, right, and hcenter anchors.");
return false;
}
@@ -1064,15 +1064,15 @@ bool QDeclarativeAnchorsPrivate::checkHAnchorValid(QDeclarativeAnchorLine anchor
bool QDeclarativeAnchorsPrivate::checkVValid() const
{
- if (usedAnchors & QDeclarativeAnchors::HasTopAnchor &&
- usedAnchors & QDeclarativeAnchors::HasBottomAnchor &&
- usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ if (usedAnchors & QDeclarativeAnchors::TopAnchor &&
+ usedAnchors & QDeclarativeAnchors::BottomAnchor &&
+ usedAnchors & QDeclarativeAnchors::VCenterAnchor) {
qmlInfo(item) << QDeclarativeAnchors::tr("Cannot specify top, bottom, and vcenter anchors.");
return false;
- } else if (usedAnchors & QDeclarativeAnchors::HasBaselineAnchor &&
- (usedAnchors & QDeclarativeAnchors::HasTopAnchor ||
- usedAnchors & QDeclarativeAnchors::HasBottomAnchor ||
- usedAnchors & QDeclarativeAnchors::HasVCenterAnchor)) {
+ } else if (usedAnchors & QDeclarativeAnchors::BaselineAnchor &&
+ (usedAnchors & QDeclarativeAnchors::TopAnchor ||
+ usedAnchors & QDeclarativeAnchors::BottomAnchor ||
+ usedAnchors & QDeclarativeAnchors::VCenterAnchor)) {
qmlInfo(item) << QDeclarativeAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.");
return false;
}
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index f2e57cc..1bd7608 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -83,18 +83,18 @@ public:
QDeclarativeAnchors(QGraphicsObject *item, QObject *parent=0);
virtual ~QDeclarativeAnchors();
- enum UsedAnchor {
- HasLeftAnchor = 0x01,
- HasRightAnchor = 0x02,
- HasTopAnchor = 0x04,
- HasBottomAnchor = 0x08,
- HasHCenterAnchor = 0x10,
- HasVCenterAnchor = 0x20,
- HasBaselineAnchor = 0x40,
- Horizontal_Mask = HasLeftAnchor | HasRightAnchor | HasHCenterAnchor,
- Vertical_Mask = HasTopAnchor | HasBottomAnchor | HasVCenterAnchor | HasBaselineAnchor
+ enum Anchor {
+ LeftAnchor = 0x01,
+ RightAnchor = 0x02,
+ TopAnchor = 0x04,
+ BottomAnchor = 0x08,
+ HCenterAnchor = 0x10,
+ VCenterAnchor = 0x20,
+ BaselineAnchor = 0x40,
+ Horizontal_Mask = LeftAnchor | RightAnchor | HCenterAnchor,
+ Vertical_Mask = TopAnchor | BottomAnchor | VCenterAnchor | BaselineAnchor
};
- Q_DECLARE_FLAGS(UsedAnchors, UsedAnchor)
+ Q_DECLARE_FLAGS(Anchors, Anchor)
QDeclarativeAnchorLine left() const;
void setLeft(const QDeclarativeAnchorLine &edge);
@@ -156,7 +156,7 @@ public:
void setCenterIn(QGraphicsObject *);
void resetCenterIn();
- UsedAnchors usedAnchors() const;
+ Anchors usedAnchors() const;
void classBegin();
void componentComplete();
@@ -188,7 +188,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_widgetGeometryChanged())
Q_PRIVATE_SLOT(d_func(), void _q_widgetDestroyed(QObject *obj))
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeAnchors::UsedAnchors)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeAnchors::Anchors)
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
index f8489aa..05be6c5 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
@@ -139,7 +139,7 @@ public:
void centerInChanged();
QGraphicsObject *item;
- QDeclarativeAnchors::UsedAnchors usedAnchors;
+ QDeclarativeAnchors::Anchors usedAnchors;
QGraphicsObject *fill;
QGraphicsObject *centerIn;
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index 6ab126d..c81c2d2 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -44,6 +44,7 @@
#ifndef QT_NO_MOVIE
+#include <qdeclarativeinfo.h>
#include <qdeclarativeengine.h>
#include <QMovie>
@@ -213,7 +214,7 @@ void QDeclarativeAnimatedImage::setSource(const QUrl &url)
//### should be unified with movieRequestFinished
d->_movie = new QMovie(lf);
if (!d->_movie->isValid()){
- qWarning() << "Error Reading Animated Image File" << d->url;
+ qmlInfo(this) << "Error Reading Animated Image File " << d->url.toString();
delete d->_movie;
d->_movie = 0;
return;
@@ -270,7 +271,7 @@ void QDeclarativeAnimatedImage::movieRequestFinished()
d->_movie = new QMovie(d->reply);
if (!d->_movie->isValid()){
- qWarning() << "Error Reading Animated Image File " << d->url;
+ qmlInfo(this) << "Error Reading Animated Image File " << d->url;
delete d->_movie;
d->_movie = 0;
return;
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index be9d8bd..06f8363 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -82,7 +82,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
QDeclarativePixmapCache::cancel(d->sciurl, this);
}
/*!
- \qmlproperty enum BorderImage::status
+ \qmlproperty enumeration BorderImage::status
This property holds the status of image loading. It can be one of:
\list
@@ -264,9 +264,9 @@ void QDeclarativeBorderImage::load()
When the image is scaled:
\list
\i the corners (sections 1, 3, 7, and 9) are not scaled at all
- \i the middle (section 5) is scaled according to BorderImage::horizontalTileMode and BorderImage::verticalTileMode
- \i sections 2 and 8 are scaled according to BorderImage::horizontalTileMode
- \i sections 4 and 6 are scaled according to BorderImage::verticalTileMode
+ \i sections 2 and 8 are scaled according to \l{BorderImage::horizontalTileMode}{horizontalTileMode}
+ \i sections 4 and 6 are scaled according to \l{BorderImage::verticalTileMode}{verticalTileMode}
+ \i the middle (section 5) is scaled according to both \l{BorderImage::horizontalTileMode}{horizontalTileMode} and \l{BorderImage::verticalTileMode}{verticalTileMode}
\endlist
Each border line (left, right, top, and bottom) specifies an offset from the respective side. For example, \c{border.bottom: 10} sets the bottom line 10 pixels up from the bottom of the image.
@@ -282,8 +282,8 @@ QDeclarativeScaleGrid *QDeclarativeBorderImage::border()
}
/*!
- \qmlproperty TileMode BorderImage::horizontalTileMode
- \qmlproperty TileMode BorderImage::verticalTileMode
+ \qmlproperty enumeration BorderImage::horizontalTileMode
+ \qmlproperty enumeration BorderImage::verticalTileMode
This property describes how to repeat or stretch the middle parts of the border image.
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects.cpp b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
deleted file mode 100644
index ea1f9cc..0000000
--- a/src/declarative/graphicsitems/qdeclarativeeffects.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qdeclarative.h>
-
-#include <QtGui/qgraphicseffect.h>
-
-/*!
- \qmlclass Blur QGraphicsBlurEffect
- \since 4.7
- \brief The Blur object provides a blur effect.
-
- A blur effect blurs the source item. This effect is useful for reducing details;
- for example, when the a source loses focus and attention should be drawn to other
- elements. Use blurRadius to control the level of detail and blurHint to control
- the quality of the blur.
-
- By default, the blur radius is 5 pixels.
-
- \img graphicseffect-blur.png
-*/
-
-/*!
- \qmlproperty real Blur::blurRadius
-
- This controls how blurry an item will appear.
-
- A smaller radius produces a sharper appearance, and a larger radius produces
- a more blurred appearance.
-
- The default radius is 5 pixels.
-*/
-/*!
- \qmlproperty enumeration Blur::blurHint
-
- Use Qt.PerformanceHint to specify a faster blur or Qt.QualityHint hint
- to specify a higher quality blur.
-
- If the blur radius is animated, it is recommended you use Qt.PerformanceHint.
-
- The default hint is Qt.PerformanceHint.
-*/
-
-/*!
- \qmlclass Colorize QGraphicsColorizeEffect
- \since 4.7
- \brief The Colorize object provides a colorize effect.
-
- A colorize effect renders the source item with a tint of its color.
-
- By default, the color is light blue.
-
- \img graphicseffect-colorize.png
-*/
-
-/*!
- \qmlproperty color Colorize::color
- The color of the effect.
-
- By default, the color is light blue.
-*/
-
-/*!
- \qmlproperty real Colorize::strength
-
- To what extent the source item is "colored". A strength of 0.0 is equal to no effect,
- while 1.0 means full colorization. By default, the strength is 1.0.
-*/
-
-
-/*!
- \qmlclass DropShadow QGraphicsDropShadowEffect
- \since 4.7
- \brief The DropShadow object provides a drop shadow effect.
-
- A drop shadow effect renders the source item with a drop shadow. The color of
- the drop shadow can be modified using the color property. The drop
- shadow offset can be modified using the xOffset and yOffset properties and the blur
- radius of the drop shadow can be changed with the blurRadius property.
-
- By default, the drop shadow is a semi-transparent dark gray shadow,
- blurred with a radius of 1 at an offset of 8 pixels towards the lower right.
-
- \img graphicseffect-drop-shadow.png
-*/
-
-/*!
- \qmlproperty real DropShadow::xOffset
- \qmlproperty real DropShadow::yOffset
- The shadow offset in pixels.
-
- By default, xOffset and yOffset are 8 pixels.
-*/
-
-/*!
- \qmlproperty real DropShadow::blurRadius
- The blur radius in pixels of the drop shadow.
-
- Using a smaller radius results in a sharper shadow, whereas using a bigger
- radius results in a more blurred shadow.
-
- By default, the blur radius is 1 pixel.
-*/
-
-/*!
- \qmlproperty color DropShadow::color
- The color of the drop shadow.
-
- By default, the drop color is a semi-transparent dark gray.
-*/
-
-
-/*!
- \qmlclass Opacity QGraphicsOpacityEffect
- \since 4.7
- \brief The Opacity object provides an opacity effect.
-
- An opacity effect renders the source with an opacity. This effect is useful
- for making the source semi-transparent, similar to a fade-in/fade-out
- sequence. The opacity can be modified using the opacity property.
-
- By default, the opacity is 0.7.
-
- \img graphicseffect-opacity.png
-*/
-
-/*!
- \qmlproperty real Opacity::opacity
- This property specifies how opaque an item should appear.
-
- The value should be in the range of 0.0 to 1.0, where 0.0 is
- fully transparent and 1.0 is fully opaque.
-
- By default, the opacity is 0.7.
-*/
-
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index a181071..4425c97 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -145,7 +145,7 @@ Item {
*/
/*!
- \qmlproperty enum MouseEvent::button
+ \qmlproperty enumeration MouseEvent::button
This property holds the button that caused the event. It can be one of:
\list
diff --git a/src/declarative/graphicsitems/qdeclarativeevents_p_p.h b/src/declarative/graphicsitems/qdeclarativeevents_p_p.h
index 65ac8de..0e0329e 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeevents_p_p.h
@@ -115,6 +115,10 @@ public:
bool wasHeld() const { return _wasHeld; }
bool isClick() const { return _isClick; }
+ // only for internal usage
+ void setX(int x) { _x = x; }
+ void setY(int y) { _y = y; }
+
bool isAccepted() { return _accepted; }
void setAccepted(bool accepted) { _accepted = accepted; }
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 951b171..b462443 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -41,7 +41,7 @@
#include "private/qdeclarativeflickable_p.h"
#include "private/qdeclarativeflickable_p_p.h"
-
+#include <qdeclarativeinfo.h>
#include <QGraphicsSceneMouseEvent>
#include <QPointer>
#include <QTimer>
@@ -125,12 +125,13 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate()
: viewport(new QDeclarativeItem)
, hData(this, &QDeclarativeFlickablePrivate::setRoundedViewportX)
, vData(this, &QDeclarativeFlickablePrivate::setRoundedViewportY)
- , overShoot(true), flicked(false), moving(false), stealMouse(false)
+ , flicked(false), moving(false), stealMouse(false)
, pressed(false)
, interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100)
, delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600)
, vTime(0), visibleArea(0)
, flickDirection(QDeclarativeFlickable::AutoFlickDirection)
+ , boundsBehavior(QDeclarativeFlickable::DragAndOvershootBounds)
{
}
@@ -203,6 +204,7 @@ void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal
{
Q_Q(QDeclarativeFlickable);
qreal maxDistance = -1;
+ bool overShoot = boundsBehavior == QDeclarativeFlickable::DragAndOvershootBounds;
// -ve velocity means list is moving up
if (velocity > 0) {
if (data.move.value() < minExtent)
@@ -248,18 +250,12 @@ void QDeclarativeFlickablePrivate::fixupX_callback(void *data)
void QDeclarativeFlickablePrivate::fixupX()
{
Q_Q(QDeclarativeFlickable);
- if (!q->xflick() || hData.move.timeLine())
- return;
-
fixup(hData, q->minXExtent(), q->maxXExtent());
}
void QDeclarativeFlickablePrivate::fixupY()
{
Q_Q(QDeclarativeFlickable);
- if (!q->yflick() || vData.move.timeLine())
- return;
-
fixup(vData, q->minYExtent(), q->maxYExtent());
}
@@ -272,7 +268,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
if (fixupDuration) {
qreal dist = minExtent - data.move;
timeline.move(data.move, minExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
- timeline.move(data.move, minExtent, QEasingCurve(QEasingCurve::OutQuint), 3*fixupDuration/4);
+ timeline.move(data.move, minExtent, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);
} else {
data.move.setValue(minExtent);
q->viewportMoved();
@@ -284,7 +280,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
if (fixupDuration) {
qreal dist = maxExtent - data.move;
timeline.move(data.move, maxExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
- timeline.move(data.move, maxExtent, QEasingCurve(QEasingCurve::OutQuint), 3*fixupDuration/4);
+ timeline.move(data.move, maxExtent, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);
} else {
data.move.setValue(maxExtent);
q->viewportMoved();
@@ -652,7 +648,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
newY = minY + (newY - minY) / 2;
if (newY < maxY && maxY - minY <= 0)
newY = maxY + (newY - maxY) / 2;
- if (!q->overShoot() && (newY > minY || newY < maxY)) {
+ if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newY > minY || newY < maxY)) {
if (newY > minY)
newY = minY;
else if (newY < maxY)
@@ -661,7 +657,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
rejectY = true;
}
if (!rejectY && stealMouse) {
- vData.move.setValue(newY);
+ vData.move.setValue(qRound(newY));
moved = true;
}
if (qAbs(dy) > QApplication::startDragDistance())
@@ -679,7 +675,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
newX = minX + (newX - minX) / 2;
if (newX < maxX && maxX - minX <= 0)
newX = maxX + (newX - maxX) / 2;
- if (!q->overShoot() && (newX > minX || newX < maxX)) {
+ if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newX > minX || newX < maxX)) {
if (newX > minX)
newX = minX;
else if (newX < maxX)
@@ -688,7 +684,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
rejectX = true;
}
if (!rejectX && stealMouse) {
- hData.move.setValue(newX);
+ hData.move.setValue(qRound(newX));
moved = true;
}
@@ -1003,28 +999,58 @@ QDeclarativeListProperty<QGraphicsObject> QDeclarativeFlickable::flickableChildr
return QGraphicsItemPrivate::get(d->viewport)->childrenList();
}
+bool QDeclarativeFlickable::overShoot() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->boundsBehavior == DragAndOvershootBounds;
+}
+
+void QDeclarativeFlickable::setOverShoot(bool o)
+{
+ Q_D(QDeclarativeFlickable);
+ if ((o && d->boundsBehavior == DragAndOvershootBounds)
+ || (!o && d->boundsBehavior == StopAtBounds))
+ return;
+ qmlInfo(this) << "overshoot is deprecated and will be removed imminently - use boundsBehavior.";
+ d->boundsBehavior = o ? DragAndOvershootBounds : StopAtBounds;
+ emit boundsBehaviorChanged();
+ emit overShootChanged();
+}
+
/*!
- \qmlproperty bool Flickable::overShoot
- This property holds whether the surface may overshoot the
+ \qmlproperty enumeration Flickable::boundsBehavior
+ This property holds whether the surface may be dragged
+ beyond the Fickable's boundaries, or overshoot the
Flickable's boundaries when flicked.
- If overShoot is true the contents can be flicked beyond the boundary
- of the Flickable before being moved back to the boundary. This provides
- the feeling that the edges of the view are soft, rather than a hard
- physical boundary.
+ This enables the feeling that the edges of the view are soft,
+ rather than a hard physical boundary.
+
+ boundsBehavior can be one of:
+
+ \list
+ \o \e StopAtBounds - the contents can not be dragged beyond the boundary
+ of the flickable, and flicks will not overshoot.
+ \o \e DragOverBounds - the contents can be dragged beyond the boundary
+ of the Flickable, but flicks will not overshoot.
+ \o \e DragAndOvershootBounds (default) - the contents can be dragged
+ beyond the boundary of the Flickable, and can overshoot the
+ boundary when flicked.
+ \endlist
*/
-bool QDeclarativeFlickable::overShoot() const
+QDeclarativeFlickable::BoundsBehavior QDeclarativeFlickable::boundsBehavior() const
{
Q_D(const QDeclarativeFlickable);
- return d->overShoot;
+ return d->boundsBehavior;
}
-void QDeclarativeFlickable::setOverShoot(bool o)
+void QDeclarativeFlickable::setBoundsBehavior(BoundsBehavior b)
{
Q_D(QDeclarativeFlickable);
- if (d->overShoot == o)
+ if (b == d->boundsBehavior)
return;
- d->overShoot = o;
+ d->boundsBehavior = b;
+ emit boundsBehaviorChanged();
emit overShootChanged();
}
@@ -1059,8 +1085,12 @@ void QDeclarativeFlickable::setContentWidth(qreal w)
else
d->viewport->setWidth(w);
// Make sure that we're entirely in view.
- if (!d->pressed)
+ if (!d->pressed) {
+ int oldDuration = d->fixupDuration;
+ d->fixupDuration = 0;
d->fixupX();
+ d->fixupDuration = oldDuration;
+ }
emit contentWidthChanged();
d->updateBeginningEnd();
}
@@ -1082,8 +1112,12 @@ void QDeclarativeFlickable::setContentHeight(qreal h)
else
d->viewport->setHeight(h);
// Make sure that we're entirely in view.
- if (!d->pressed)
+ if (!d->pressed) {
+ int oldDuration = d->fixupDuration;
+ d->fixupDuration = 0;
d->fixupY();
+ d->fixupDuration = oldDuration;
+ }
emit contentHeightChanged();
d->updateBeginningEnd();
}
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
index 1fa2c74..f031a24 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -64,7 +64,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem
Q_PROPERTY(qreal horizontalVelocity READ horizontalVelocity NOTIFY horizontalVelocityChanged)
Q_PROPERTY(qreal verticalVelocity READ verticalVelocity NOTIFY verticalVelocityChanged)
- Q_PROPERTY(bool overShoot READ overShoot WRITE setOverShoot NOTIFY overShootChanged)
+ Q_PROPERTY(bool overShoot READ overShoot WRITE setOverShoot NOTIFY overShootChanged) // deprecated
+ Q_PROPERTY(BoundsBehavior boundsBehavior READ boundsBehavior WRITE setBoundsBehavior NOTIFY boundsBehaviorChanged)
Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged)
Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
@@ -86,6 +87,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem
Q_CLASSINFO("DefaultProperty", "flickableData")
Q_ENUMS(FlickDirection)
+ Q_ENUMS(BoundsBehavior)
public:
QDeclarativeFlickable(QDeclarativeItem *parent=0);
@@ -97,6 +99,10 @@ public:
bool overShoot() const;
void setOverShoot(bool);
+ enum BoundsBehavior { StopAtBounds, DragOverBounds, DragAndOvershootBounds };
+ BoundsBehavior boundsBehavior() const;
+ void setBoundsBehavior(BoundsBehavior);
+
qreal contentWidth() const;
void setContentWidth(qreal);
@@ -156,6 +162,7 @@ Q_SIGNALS:
void flickDirectionChanged();
void interactiveChanged();
void overShootChanged();
+ void boundsBehaviorChanged();
void maximumFlickVelocityChanged();
void flickDecelerationChanged();
void pressDelayChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index 1a04091..01cfb18 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -131,7 +131,6 @@ public:
AxisData vData;
QDeclarativeTimeLine timeline;
- bool overShoot : 1;
bool flicked : 1;
bool moving : 1;
bool stealMouse : 1;
@@ -160,6 +159,7 @@ public:
QDeclarativeTimeLine velocityTimeline;
QDeclarativeFlickableVisibleArea *visibleArea;
QDeclarativeFlickable::FlickDirection flickDirection;
+ QDeclarativeFlickable::BoundsBehavior boundsBehavior;
void handleMousePressEvent(QGraphicsSceneMouseEvent *);
void handleMouseMoveEvent(QGraphicsSceneMouseEvent *);
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 98e34a9..57045f1 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -57,10 +57,14 @@ public:
QDeclarativeFlipablePrivate() : current(QDeclarativeFlipable::Front), front(0), back(0) {}
void updateSceneTransformFromParent();
+ void setBackTransform();
QDeclarativeFlipable::Side current;
QDeclarativeGuard<QGraphicsObject> front;
QDeclarativeGuard<QGraphicsObject> back;
+
+ bool wantBackXFlipped;
+ bool wantBackYFlipped;
};
/*!
@@ -148,6 +152,17 @@ void QDeclarativeFlipable::setBack(QGraphicsObject *back)
d->back->setParentItem(this);
if (Front == d->current)
d->back->setOpacity(0.);
+ connect(back, SIGNAL(widthChanged()),
+ this, SLOT(retransformBack()));
+ connect(back, SIGNAL(heightChanged()),
+ this, SLOT(retransformBack()));
+}
+
+void QDeclarativeFlipable::retransformBack()
+{
+ Q_D(QDeclarativeFlipable);
+ if (d->current == QDeclarativeFlipable::Back && d->back)
+ d->setBackTransform();
}
/*!
@@ -184,26 +199,20 @@ void QDeclarativeFlipablePrivate::updateSceneTransformFromParent()
qreal cross = (p1.x() - p2.x()) * (p3.y() - p2.y()) -
(p1.y() - p2.y()) * (p3.x() - p2.x());
+ wantBackYFlipped = p1.x() >= p2.x();
+ wantBackXFlipped = p2.y() >= p3.y();
+
QDeclarativeFlipable::Side newSide;
if (cross > 0) {
- newSide = QDeclarativeFlipable::Back;
+ newSide = QDeclarativeFlipable::Back;
} else {
newSide = QDeclarativeFlipable::Front;
}
if (newSide != current) {
current = newSide;
- if (current == QDeclarativeFlipable::Back && back) {
- QTransform mat;
- QGraphicsItemPrivate *dBack = QGraphicsItemPrivate::get(back);
- mat.translate(dBack->width()/2,dBack->height()/2);
- if (dBack->width() && p1.x() >= p2.x())
- mat.rotate(180, Qt::YAxis);
- if (dBack->height() && p2.y() >= p3.y())
- mat.rotate(180, Qt::XAxis);
- mat.translate(-dBack->width()/2,-dBack->height()/2);
- back->setTransform(mat);
- }
+ if (current == QDeclarativeFlipable::Back && back)
+ setBackTransform();
if (front)
front->setOpacity((current==QDeclarativeFlipable::Front)?1.:0.);
if (back)
@@ -212,4 +221,20 @@ void QDeclarativeFlipablePrivate::updateSceneTransformFromParent()
}
}
+/* Depends on the width/height of the back item, and so needs reevaulating
+ if those change.
+*/
+void QDeclarativeFlipablePrivate::setBackTransform()
+{
+ QTransform mat;
+ QGraphicsItemPrivate *dBack = QGraphicsItemPrivate::get(back);
+ mat.translate(dBack->width()/2,dBack->height()/2);
+ if (dBack->width() && wantBackYFlipped)
+ mat.rotate(180, Qt::YAxis);
+ if (dBack->height() && wantBackXFlipped)
+ mat.rotate(180, Qt::XAxis);
+ mat.translate(-dBack->width()/2,-dBack->height()/2);
+ back->setTransform(mat);
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable_p.h b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
index 302f083..fd0119b 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
@@ -81,6 +81,9 @@ public:
Q_SIGNALS:
void sideChanged();
+private Q_SLOTS:
+ void retransformBack();
+
private:
Q_DISABLE_COPY(QDeclarativeFlipable)
Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeFlipable)
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 562ba2a..f8b773e 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -50,6 +50,7 @@
#include <qlistmodelinterface_p.h>
#include <QKeyEvent>
+#include <qmath.h>
#include <math.h>
QT_BEGIN_NAMESPACE
@@ -346,6 +347,7 @@ public:
void QDeclarativeGridViewPrivate::init()
{
Q_Q(QDeclarativeGridView);
+ QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped()));
q->setFlag(QGraphicsItem::ItemIsFocusScope);
q->setFlickDirection(QDeclarativeFlickable::VerticalFlick);
addItemChangeListener(this, Geometry);
@@ -746,24 +748,31 @@ void QDeclarativeGridViewPrivate::fixupPosition()
void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
{
Q_Q(QDeclarativeGridView);
-
- if ((&data == &vData && !q->yflick())
- || (&data == &hData && !q->xflick())
- || data.move.timeLine())
+ if ((flow == QDeclarativeGridView::TopToBottom && &data == &vData)
+ || (flow == QDeclarativeGridView::LeftToRight && &data == &hData))
return;
int oldDuration = fixupDuration;
fixupDuration = moveReason == Mouse ? fixupDuration : 0;
if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
- if (currentItem && currentItem->rowPos() - position() != highlightRangeStart) {
- qreal pos = currentItem->rowPos() - highlightRangeStart;
+ if (currentItem) {
+ updateHighlight();
+ qreal pos = currentItem->rowPos();
+ qreal viewPos = position();
+ if (viewPos < pos + rowSize() - highlightRangeEnd)
+ viewPos = pos + rowSize() - highlightRangeEnd;
+ if (viewPos > pos - highlightRangeStart)
+ viewPos = pos - highlightRangeStart;
+
timeline.reset(data.move);
- if (fixupDuration) {
- timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(-pos);
- q->viewportMoved();
+ if (viewPos != position()) {
+ if (fixupDuration) {
+ timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ } else {
+ data.move.setValue(-viewPos);
+ q->viewportMoved();
+ }
}
vTime = timeline.time();
}
@@ -808,7 +817,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
maxDistance = qAbs(minExtent - data.move.value());
}
}
- if (snapMode != QDeclarativeGridView::SnapToRow && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
+ if (snapMode == QDeclarativeGridView::NoSnap && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
data.flickTarget = minExtent;
} else {
if (data.move.value() > maxExtent) {
@@ -819,9 +828,10 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
maxDistance = qAbs(maxExtent - data.move.value());
}
}
- if (snapMode != QDeclarativeGridView::SnapToRow && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
+ if (snapMode == QDeclarativeGridView::NoSnap && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
data.flickTarget = maxExtent;
}
+ bool overShoot = boundsBehavior == QDeclarativeFlickable::DragAndOvershootBounds;
if (maxDistance > 0 || overShoot) {
// This mode requires the grid to stop exactly on a row boundary.
qreal v = velocity;
@@ -840,7 +850,15 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
if (v > 0)
dist = -dist;
data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart;
- dist = -data.flickTarget + data.move.value();
+ qreal adjDist = -data.flickTarget + data.move.value();
+ if (qAbs(adjDist) > qAbs(dist)) {
+ // Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
+ v2 = accel * 2.0f * qAbs(dist);
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
+ dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
} else {
data.flickTarget = velocity > 0 ? minExtent : maxExtent;
@@ -885,7 +903,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
- Note that views do not enable \e clip automatically. If the view
+ \bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
@@ -1507,12 +1525,12 @@ void QDeclarativeGridView::viewportMoved()
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
// reposition highlight
qreal pos = d->highlight->rowPos();
- qreal viewPos = qRound(d->position());
- if (pos > viewPos + d->highlightRangeEnd - 1 - d->rowSize())
- pos = viewPos + d->highlightRangeEnd - 1 - d->rowSize();
+ qreal viewPos = d->position();
+ if (pos > viewPos + d->highlightRangeEnd - d->rowSize())
+ pos = viewPos + d->highlightRangeEnd - d->rowSize();
if (pos < viewPos + d->highlightRangeStart)
pos = viewPos + d->highlightRangeStart;
- d->highlight->setPosition(d->highlight->colPos(), pos);
+ d->highlight->setPosition(d->highlight->colPos(), qRound(pos));
// update current index
int idx = d->snapIndex();
@@ -1535,8 +1553,10 @@ qreal QDeclarativeGridView::minYExtent() const
if (d->flow == QDeclarativeGridView::TopToBottom)
return QDeclarativeFlickable::minYExtent();
qreal extent = -d->startPosition();
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent += d->highlightRangeStart;
+ extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd));
+ }
return extent;
}
@@ -1547,8 +1567,9 @@ qreal QDeclarativeGridView::maxYExtent() const
return QDeclarativeFlickable::maxYExtent();
qreal extent;
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- extent = -(d->endPosition() - d->highlightRangeEnd);
- extent = qMax(extent, -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart));
+ extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart);
+ if (d->highlightRangeEnd != d->highlightRangeStart)
+ extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1));
} else {
extent = -(d->endPosition() - height());
}
@@ -1564,8 +1585,10 @@ qreal QDeclarativeGridView::minXExtent() const
if (d->flow == QDeclarativeGridView::LeftToRight)
return QDeclarativeFlickable::minXExtent();
qreal extent = -d->startPosition();
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent += d->highlightRangeStart;
+ extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd));
+ }
return extent;
}
@@ -1576,8 +1599,9 @@ qreal QDeclarativeGridView::maxXExtent() const
return QDeclarativeFlickable::maxXExtent();
qreal extent;
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- extent = -(d->endPosition() - d->highlightRangeEnd);
- extent = qMax(extent, -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart));
+ extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart);
+ if (d->highlightRangeEnd != d->highlightRangeStart)
+ extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1));
} else {
extent = -(d->endPosition() - height());
}
@@ -2247,6 +2271,13 @@ void QDeclarativeGridView::destroyingItem(QDeclarativeItem *item)
d->unrequestedItems.remove(item);
}
+void QDeclarativeGridView::animStopped()
+{
+ Q_D(QDeclarativeGridView);
+ d->bufferMode = QDeclarativeGridViewPrivate::NoBuffer;
+ if (d->haveHighlightRange && d->highlightRange == QDeclarativeGridView::StrictlyEnforceRange)
+ d->updateHighlight();
+}
void QDeclarativeGridView::refill()
{
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index 5baa1dd..c06879e 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -192,6 +192,7 @@ private Q_SLOTS:
void destroyRemoved();
void createdItem(int index, QDeclarativeItem *item);
void destroyingItem(QDeclarativeItem *item);
+ void animStopped();
private:
void refill();
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index ca86637..247e348 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -221,7 +221,7 @@ qreal QDeclarativeImage::paintedHeight() const
}
/*!
- \qmlproperty enum Image::status
+ \qmlproperty enumeration Image::status
This property holds the status of image loading. It can be one of:
\list
@@ -236,9 +236,12 @@ qreal QDeclarativeImage::paintedHeight() const
to react to the change in status you need to do it yourself, for example in one
of the following ways:
\list
- \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: image.status = Image.Ready;}
- \o Do something inside the onStatusChanged signal handler, e.g. Image{id: image; onStatusChanged: if(image.status == Image.Ready) console.log('Loaded');}
- \o Bind to the status variable somewhere, e.g. Text{text: if(image.status!=Image.Ready){'Not Loaded';}else{'Loaded';}}
+ \o Create a state, so that a state change occurs, e.g.
+ \qml State { name: 'loaded'; when: image.status = Image.Ready } \endqml
+ \o Do something inside the onStatusChanged signal handler, e.g.
+ \qml Image { id: image; onStatusChanged: if (image.status == Image.Ready) console.log('Loaded') } \endqml
+ \o Bind to the status variable somewhere, e.g.
+ \qml Text { text: if (image.status != Image.Ready) { 'Not Loaded' } else { 'Loaded' } } \endqml
\endlist
\sa progress
@@ -366,12 +369,27 @@ void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWi
if (width() != d->pix.width() || height() != d->pix.height()) {
if (d->fillMode >= Tile) {
- if (d->fillMode == Tile)
+ if (d->fillMode == Tile) {
p->drawTiledPixmap(QRectF(0,0,width(),height()), d->pix);
- else if (d->fillMode == TileVertically)
- p->drawTiledPixmap(QRectF(0,0,d->pix.width(),height()), d->pix);
- else
- p->drawTiledPixmap(QRectF(0,0,width(),d->pix.height()), d->pix);
+ } else {
+ qreal widthScale = width() / qreal(d->pix.width());
+ qreal heightScale = height() / qreal(d->pix.height());
+
+ QTransform scale;
+ if (d->fillMode == TileVertically) {
+ scale.scale(widthScale, 1.0);
+ QTransform old = p->transform();
+ p->setWorldTransform(scale * old);
+ p->drawTiledPixmap(QRectF(0,0,d->pix.width(),height()), d->pix);
+ p->setWorldTransform(old);
+ } else {
+ scale.scale(1.0, heightScale);
+ QTransform old = p->transform();
+ p->setWorldTransform(scale * old);
+ p->drawTiledPixmap(QRectF(0,0,width(),d->pix.height()), d->pix);
+ p->setWorldTransform(old);
+ }
+ }
} else {
qreal widthScale = width() / qreal(d->pix.width());
qreal heightScale = height() / qreal(d->pix.height());
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 86dbaf0..bc0c65e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -61,7 +61,6 @@
#include <QtCore/qnumeric.h>
#include <QtScript/qscriptengine.h>
#include <QtGui/qgraphicstransform.h>
-#include <QtGui/qgraphicseffect.h>
#include <qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
@@ -70,8 +69,6 @@ QT_BEGIN_NAMESPACE
#define FLT_MAX 1E+37
#endif
-#include "qdeclarativeeffects.cpp"
-
/*!
\qmlclass Transform QGraphicsTransform
\since 4.7
@@ -234,11 +231,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \group group_effects
- \title Effects
-*/
-
-/*!
\group group_layouts
\title Layouts
*/
@@ -275,17 +267,6 @@ QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_hei
{
}
-/*!
- \qmlproperty real Item::childrenRect.x
- \qmlproperty real Item::childrenRect.y
- \qmlproperty real Item::childrenRect.width
- \qmlproperty real Item::childrenRect.height
-
- The childrenRect properties allow an item access to the geometry of its
- children. This property is useful if you have an item that needs to be
- sized to fit its children.
-*/
-
QRectF QDeclarativeContents::rectF() const
{
return QRectF(m_x, m_y, m_width, m_height);
@@ -1415,7 +1396,7 @@ QDeclarativeItem::~QDeclarativeItem()
}
/*!
- \qmlproperty enum Item::transformOrigin
+ \qmlproperty enumeration Item::transformOrigin
This property holds the origin point around which scale and rotation transform.
Nine transform origins are available, as shown in the image below.
@@ -1457,6 +1438,18 @@ QDeclarativeItem *QDeclarativeItem::parentItem() const
}
/*!
+ \qmlproperty real Item::childrenRect.x
+ \qmlproperty real Item::childrenRect.y
+ \qmlproperty real Item::childrenRect.width
+ \qmlproperty real Item::childrenRect.height
+
+ The childrenRect properties allow an item access to the geometry of its
+ children. This property is useful if you have an item that needs to be
+ sized to fit its children.
+*/
+
+
+/*!
\qmlproperty list<Item> Item::children
\qmlproperty list<Object> Item::resources
@@ -1594,10 +1587,10 @@ void QDeclarativeItemPrivate::transform_clear(QDeclarativeListProperty<QGraphics
}
}
-void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeNotifierEndpoint *e)
+void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeNotifierEndpoint *e)
{
QDeclarativeItem *item = static_cast<QDeclarativeItem*>(o);
- if (e)
+ if (e)
e->connect(&item->d_func()->parentNotifier);
*((QDeclarativeItem **)rv) = item->parentItem();
}
@@ -1794,9 +1787,13 @@ void QDeclarativeItem::geometryChanged(const QRectF &newGeometry,
if (transformOrigin() != QDeclarativeItem::TopLeft
&& (newGeometry.width() != oldGeometry.width() || newGeometry.height() != oldGeometry.height())) {
- QPointF origin = d->computeTransformOrigin();
- if (transformOriginPoint() != origin)
- setTransformOriginPoint(origin);
+ if (d->transformData) {
+ QPointF origin = d->computeTransformOrigin();
+ if (transformOriginPoint() != origin)
+ setTransformOriginPoint(origin);
+ } else {
+ d->transformOriginDirty = true;
+ }
}
if (newGeometry.x() != oldGeometry.x())
@@ -2149,8 +2146,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
Opacity is an \e inherited attribute. That is, the opacity is
also applied individually to child items. In almost all cases this
- is what you want. If you can spot the issue in the following
- example, you might need to use an \l Opacity effect instead.
+ is what you want, but in some cases (like the following example)
+ it may produce undesired results.
\table
\row
@@ -2238,7 +2235,7 @@ QScriptValue QDeclarativeItem::mapFromItem(const QScriptValue &item, qreal x, qr
QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject();
QDeclarativeItem *itemObj = qobject_cast<QDeclarativeItem*>(item.toQObject());
if (!itemObj && !item.isNull()) {
- qWarning().nospace() << "mapFromItem() given argument " << item.toString() << " which is neither null nor an Item";
+ qmlInfo(this) << "mapFromItem() given argument \"" << item.toString() << "\" which is neither null nor an Item";
return 0;
}
@@ -2264,7 +2261,7 @@ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qrea
QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject();
QDeclarativeItem *itemObj = qobject_cast<QDeclarativeItem*>(item.toQObject());
if (!itemObj && !item.isNull()) {
- qWarning().nospace() << "mapToItem() given argument " << item.toString() << " which is neither null nor an Item";
+ qmlInfo(this) << "mapToItem() given argument \"" << item.toString() << "\" which is neither null nor an Item";
return 0;
}
@@ -2275,6 +2272,23 @@ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qrea
return sv;
}
+/*!
+ \qmlmethod Item::forceFocus()
+
+ Force the focus on the item.
+ This method sets the focus on the item and makes sure that all the focus scopes higher in the object hierarchy are given focus.
+*/
+void QDeclarativeItem::forceFocus()
+{
+ setFocus(true);
+ QGraphicsItem *parent = parentItem();
+ while (parent) {
+ if (parent->flags() & QGraphicsItem::ItemIsFocusScope)
+ parent->setFocus(Qt::OtherFocusReason);
+ parent = parent->parentItem();
+ }
+}
+
void QDeclarativeItemPrivate::focusChanged(bool flag)
{
Q_Q(QDeclarativeItem);
@@ -2656,11 +2670,23 @@ void QDeclarativeItem::setTransformOrigin(TransformOrigin origin)
Q_D(QDeclarativeItem);
if (origin != d->origin) {
d->origin = origin;
- QGraphicsItem::setTransformOriginPoint(d->computeTransformOrigin());
+ if (d->transformData)
+ QGraphicsItem::setTransformOriginPoint(d->computeTransformOrigin());
+ else
+ d->transformOriginDirty = true;
emit transformOriginChanged(d->origin);
}
}
+void QDeclarativeItemPrivate::transformChanged()
+{
+ Q_Q(QDeclarativeItem);
+ if (transformOriginDirty) {
+ q->QGraphicsItem::setTransformOriginPoint(computeTransformOrigin());
+ transformOriginDirty = false;
+ }
+}
+
/*!
\property QDeclarativeItem::smooth
\brief whether the item is smoothly transformed.
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 51889f6..da5a36e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -157,6 +157,7 @@ public:
Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const;
Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const;
+ Q_INVOKABLE void forceFocus();
QDeclarativeAnchorLine left() const;
QDeclarativeAnchorLine right() const;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index cf138c3..3f5bf1a 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -116,7 +116,7 @@ public:
_stateGroup(0), origin(QDeclarativeItem::Center),
widthValid(false), heightValid(false),
_componentComplete(true), _keepMouse(false),
- smooth(false), keyHandler(0),
+ smooth(false), transformOriginDirty(true), keyHandler(0),
mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
@@ -233,6 +233,7 @@ public:
bool _componentComplete:1;
bool _keepMouse:1;
bool smooth:1;
+ bool transformOriginDirty : 1;
QDeclarativeItemKeyFilter *keyHandler;
@@ -269,6 +270,9 @@ public:
}
}
+ // Reimplemented from QGraphicsItemPrivate
+ virtual void transformChanged();
+
virtual void focusChanged(bool);
static int consistentTime;
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 2d01eef..4238c53 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -46,7 +46,6 @@
#include <QtGui/qgraphicseffect.h>
#include "private/qdeclarativeevents_p_p.h"
-#include "private/qdeclarativeeffects_p.h"
#include "private/qdeclarativescalegrid_p_p.h"
#include "private/qdeclarativeanimatedimage_p.h"
#include "private/qdeclarativeborderimage_p.h"
@@ -82,56 +81,59 @@
void QDeclarativeItemModule::defineModule()
{
-#ifndef QT_NO_MOVIE
- qmlRegisterType<QDeclarativeAnimatedImage>("Qt",4,6,"AnimatedImage");
+#ifdef QT_NO_MOVIE
+ qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage",
+ qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie"));
+#else
+ qmlRegisterType<QDeclarativeAnimatedImage>("Qt",4,7,"AnimatedImage");
#endif
- qmlRegisterType<QDeclarativeBorderImage>("Qt",4,6,"BorderImage");
- qmlRegisterType<QDeclarativeColumn>("Qt",4,6,"Column");
- qmlRegisterType<QDeclarativeDrag>("Qt",4,6,"Drag");
- qmlRegisterType<QDeclarativeFlickable>("Qt",4,6,"Flickable");
- qmlRegisterType<QDeclarativeFlipable>("Qt",4,6,"Flipable");
- qmlRegisterType<QDeclarativeFlow>("Qt",4,6,"Flow");
- qmlRegisterType<QDeclarativeFocusPanel>("Qt",4,6,"FocusPanel");
- qmlRegisterType<QDeclarativeFocusScope>("Qt",4,6,"FocusScope");
- qmlRegisterType<QDeclarativeGradient>("Qt",4,6,"Gradient");
- qmlRegisterType<QDeclarativeGradientStop>("Qt",4,6,"GradientStop");
- qmlRegisterType<QDeclarativeGrid>("Qt",4,6,"Grid");
- qmlRegisterType<QDeclarativeGridView>("Qt",4,6,"GridView");
- qmlRegisterType<QDeclarativeImage>("Qt",4,6,"Image");
- qmlRegisterType<QDeclarativeItem>("Qt",4,6,"Item");
- qmlRegisterType<QDeclarativeLayoutItem>("Qt",4,6,"LayoutItem");
- qmlRegisterType<QDeclarativeListView>("Qt",4,6,"ListView");
- qmlRegisterType<QDeclarativeLoader>("Qt",4,6,"Loader");
- qmlRegisterType<QDeclarativeMouseArea>("Qt",4,6,"MouseArea");
- qmlRegisterType<QDeclarativePath>("Qt",4,6,"Path");
- qmlRegisterType<QDeclarativePathAttribute>("Qt",4,6,"PathAttribute");
- qmlRegisterType<QDeclarativePathCubic>("Qt",4,6,"PathCubic");
- qmlRegisterType<QDeclarativePathLine>("Qt",4,6,"PathLine");
- qmlRegisterType<QDeclarativePathPercent>("Qt",4,6,"PathPercent");
- qmlRegisterType<QDeclarativePathQuad>("Qt",4,6,"PathQuad");
- qmlRegisterType<QDeclarativePathView>("Qt",4,6,"PathView");
- qmlRegisterType<QIntValidator>("Qt",4,6,"IntValidator");
+ qmlRegisterType<QDeclarativeBorderImage>("Qt",4,7,"BorderImage");
+ qmlRegisterType<QDeclarativeColumn>("Qt",4,7,"Column");
+ qmlRegisterType<QDeclarativeDrag>("Qt",4,7,"Drag");
+ qmlRegisterType<QDeclarativeFlickable>("Qt",4,7,"Flickable");
+ qmlRegisterType<QDeclarativeFlipable>("Qt",4,7,"Flipable");
+ qmlRegisterType<QDeclarativeFlow>("Qt",4,7,"Flow");
+ qmlRegisterType<QDeclarativeFocusPanel>("Qt",4,7,"FocusPanel");
+ qmlRegisterType<QDeclarativeFocusScope>("Qt",4,7,"FocusScope");
+ qmlRegisterType<QDeclarativeGradient>("Qt",4,7,"Gradient");
+ qmlRegisterType<QDeclarativeGradientStop>("Qt",4,7,"GradientStop");
+ qmlRegisterType<QDeclarativeGrid>("Qt",4,7,"Grid");
+ qmlRegisterType<QDeclarativeGridView>("Qt",4,7,"GridView");
+ qmlRegisterType<QDeclarativeImage>("Qt",4,7,"Image");
+ qmlRegisterType<QDeclarativeItem>("Qt",4,7,"Item");
+ qmlRegisterType<QDeclarativeLayoutItem>("Qt",4,7,"LayoutItem");
+ qmlRegisterType<QDeclarativeListView>("Qt",4,7,"ListView");
+ qmlRegisterType<QDeclarativeLoader>("Qt",4,7,"Loader");
+ qmlRegisterType<QDeclarativeMouseArea>("Qt",4,7,"MouseArea");
+ qmlRegisterType<QDeclarativePath>("Qt",4,7,"Path");
+ qmlRegisterType<QDeclarativePathAttribute>("Qt",4,7,"PathAttribute");
+ qmlRegisterType<QDeclarativePathCubic>("Qt",4,7,"PathCubic");
+ qmlRegisterType<QDeclarativePathLine>("Qt",4,7,"PathLine");
+ qmlRegisterType<QDeclarativePathPercent>("Qt",4,7,"PathPercent");
+ qmlRegisterType<QDeclarativePathQuad>("Qt",4,7,"PathQuad");
+ qmlRegisterType<QDeclarativePathView>("Qt",4,7,"PathView");
+ qmlRegisterType<QIntValidator>("Qt",4,7,"IntValidator");
qmlRegisterType<QDoubleValidator>("Qt",4,7,"DoubleValidator");
qmlRegisterType<QRegExpValidator>("Qt",4,7,"RegExpValidator");
- qmlRegisterType<QDeclarativeRectangle>("Qt",4,6,"Rectangle");
- qmlRegisterType<QDeclarativeRepeater>("Qt",4,6,"Repeater");
- qmlRegisterType<QGraphicsRotation>("Qt",4,6,"Rotation");
- qmlRegisterType<QDeclarativeRow>("Qt",4,6,"Row");
- qmlRegisterType<QDeclarativeTranslate>("Qt",4,6,"Translate");
- qmlRegisterType<QGraphicsScale>("Qt",4,6,"Scale");
- qmlRegisterType<QDeclarativeText>("Qt",4,6,"Text");
- qmlRegisterType<QDeclarativeTextEdit>("Qt",4,6,"TextEdit");
- qmlRegisterType<QDeclarativeTextInput>("Qt",4,6,"TextInput");
- qmlRegisterType<QDeclarativeViewSection>("Qt",4,6,"ViewSection");
- qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,6,"VisualDataModel");
- qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,6,"VisualItemModel");
+ qmlRegisterType<QDeclarativeRectangle>("Qt",4,7,"Rectangle");
+ qmlRegisterType<QDeclarativeRepeater>("Qt",4,7,"Repeater");
+ qmlRegisterType<QGraphicsRotation>("Qt",4,7,"Rotation");
+ qmlRegisterType<QDeclarativeRow>("Qt",4,7,"Row");
+ qmlRegisterType<QDeclarativeTranslate>("Qt",4,7,"Translate");
+ qmlRegisterType<QGraphicsScale>("Qt",4,7,"Scale");
+ qmlRegisterType<QDeclarativeText>("Qt",4,7,"Text");
+ qmlRegisterType<QDeclarativeTextEdit>("Qt",4,7,"TextEdit");
+ qmlRegisterType<QDeclarativeTextInput>("Qt",4,7,"TextInput");
+ qmlRegisterType<QDeclarativeViewSection>("Qt",4,7,"ViewSection");
+ qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,7,"VisualDataModel");
+ qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,7,"VisualItemModel");
qmlRegisterType<QDeclarativeAnchors>();
qmlRegisterType<QDeclarativeKeyEvent>();
qmlRegisterType<QDeclarativeMouseEvent>();
qmlRegisterType<QGraphicsObject>();
- qmlRegisterType<QGraphicsWidget>("Qt",4,6,"QGraphicsWidget");
- qmlRegisterExtendedType<QGraphicsWidget,QDeclarativeGraphicsWidget>("Qt",4,6,"QGraphicsWidget");
+ qmlRegisterType<QGraphicsWidget>("Qt",4,7,"QGraphicsWidget");
+ qmlRegisterExtendedType<QGraphicsWidget,QDeclarativeGraphicsWidget>("Qt",4,7,"QGraphicsWidget");
qmlRegisterType<QGraphicsTransform>();
qmlRegisterType<QDeclarativePathElement>();
qmlRegisterType<QDeclarativeCurve>();
@@ -141,17 +143,7 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QAction>();
qmlRegisterType<QDeclarativePen>();
qmlRegisterType<QDeclarativeFlickableVisibleArea>();
-#ifndef QT_NO_GRAPHICSEFFECT
- qmlRegisterType<QGraphicsEffect>();
- qmlRegisterType<QGraphicsBlurEffect>("Qt",4,6,"Blur");
- qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,6,"Colorize");
- qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,6,"DropShadow");
- qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,6,"Opacity");
-#endif
-#ifdef QT_WEBKIT_LIB
- qmlRegisterType<QDeclarativeWebSettings>();
-#endif
- qmlRegisterUncreatableType<QDeclarativeKeyNavigationAttached>("Qt",4,6,"KeyNavigation");
- qmlRegisterUncreatableType<QDeclarativeKeysAttached>("Qt",4,6,"Keys");
+ qmlRegisterUncreatableType<QDeclarativeKeyNavigationAttached>("Qt",4,7,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties"));
+ qmlRegisterUncreatableType<QDeclarativeKeysAttached>("Qt",4,7,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties"));
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 307c0a7..60e8f6c 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -50,6 +50,7 @@
#include <qdeclarativeguard_p.h>
#include <qlistmodelinterface_p.h>
+#include <qmath.h>
#include <QKeyEvent>
QT_BEGIN_NAMESPACE
@@ -270,6 +271,28 @@ public:
return 0;
}
+ qreal endPositionAt(int modelIndex) const {
+ if (FxListItem *item = visibleItem(modelIndex))
+ return item->endPosition();
+ if (!visibleItems.isEmpty()) {
+ if (modelIndex < visibleIndex) {
+ int count = visibleIndex - modelIndex;
+ return (*visibleItems.constBegin())->position() - (count - 1) * (averageSize + spacing) - spacing - 1;
+ } else {
+ int idx = visibleItems.count() - 1;
+ while (idx >= 0 && visibleItems.at(idx)->index == -1)
+ --idx;
+ if (idx < 0)
+ idx = visibleIndex;
+ else
+ idx = visibleItems.at(idx)->index;
+ int count = modelIndex - idx - 1;
+ return (*(--visibleItems.constEnd()))->endPosition() + count * (averageSize + spacing);
+ }
+ }
+ return 0;
+ }
+
QString sectionAt(int modelIndex) {
if (FxListItem *item = visibleItem(modelIndex))
return item->attached->section();
@@ -395,13 +418,16 @@ public:
}
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
+ Q_Q(QDeclarativeListView);
QDeclarativeFlickablePrivate::itemGeometryChanged(item, newGeometry, oldGeometry);
- if (item != viewport) {
+ if (item != viewport && (!highlight || item != highlight->item)) {
if ((orient == QDeclarativeListView::Vertical && newGeometry.height() != oldGeometry.height())
|| (orient == QDeclarativeListView::Horizontal && newGeometry.width() != oldGeometry.width())) {
scheduleLayout();
}
}
+ if (trackedItem && trackedItem->item == item)
+ q->trackedPositionChanged();
}
// for debugging only
@@ -566,13 +592,8 @@ void QDeclarativeListViewPrivate::releaseItem(FxListItem *item)
Q_Q(QDeclarativeListView);
if (!item || !model)
return;
- if (trackedItem == item) {
- const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
- const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
- QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
- QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
+ if (trackedItem == item)
trackedItem = 0;
- }
QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item->item));
itemPrivate->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
if (model->release(item->item) == 0) {
@@ -769,21 +790,7 @@ void QDeclarativeListViewPrivate::updateTrackedItem()
FxListItem *item = currentItem;
if (highlight)
item = highlight;
-
- const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
- const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
-
- if (trackedItem && item != trackedItem) {
- QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
- QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
- trackedItem = 0;
- }
-
- if (!trackedItem && item) {
- trackedItem = item;
- QObject::connect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
- QObject::connect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
- }
+ trackedItem = item;
if (trackedItem)
q->trackedPositionChanged();
}
@@ -832,6 +839,8 @@ void QDeclarativeListViewPrivate::createHighlight()
highlight->item->setWidth(currentItem->item->width());
}
}
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
const QLatin1String posProp(orient == QDeclarativeListView::Vertical ? "y" : "x");
highlightPosAnimator = new QSmoothedAnimation(q);
highlightPosAnimator->target = QDeclarativeProperty(highlight->item, posProp);
@@ -1101,23 +1110,27 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
|| (orient == QDeclarativeListView::Vertical && &data == &hData))
return;
- if ((&data == &vData && !q->yflick())
- || (&data == &hData && !q->xflick())
- || data.move.timeLine())
- return;
-
int oldDuration = fixupDuration;
fixupDuration = moveReason == Mouse ? fixupDuration : 0;
if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
- if (currentItem && currentItem->position() - position() != highlightRangeStart) {
- qreal pos = currentItem->position() - highlightRangeStart;
+ if (currentItem) {
+ updateHighlight();
+ qreal pos = currentItem->position();
+ qreal viewPos = position();
+ if (viewPos < pos + currentItem->size() - highlightRangeEnd)
+ viewPos = pos + currentItem->size() - highlightRangeEnd;
+ if (viewPos > pos - highlightRangeStart)
+ viewPos = pos - highlightRangeStart;
+
timeline.reset(data.move);
- if (fixupDuration) {
- timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(-pos);
- q->viewportMoved();
+ if (viewPos != position()) {
+ if (fixupDuration) {
+ timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ } else {
+ data.move.setValue(-viewPos);
+ q->viewportMoved();
+ }
}
vTime = timeline.time();
}
@@ -1177,6 +1190,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
if (snapMode == QDeclarativeListView::NoSnap && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
data.flickTarget = maxExtent;
}
+ bool overShoot = boundsBehavior == QDeclarativeFlickable::DragAndOvershootBounds;
if (maxDistance > 0 || overShoot) {
// These modes require the list to stop exactly on an item boundary.
// The initial flick will estimate the boundary to stop on.
@@ -1211,7 +1225,15 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
data.flickTarget -= overshootDist;
}
}
- dist = -data.flickTarget + data.move.value();
+ qreal adjDist = -data.flickTarget + data.move.value();
+ if (qAbs(adjDist) > qAbs(dist)) {
+ // Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
+ v2 = accel * 2.0f * qAbs(dist);
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
+ dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
} else if (overShoot) {
data.flickTarget = data.move.value() - dist;
@@ -1286,7 +1308,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
- Note that views do not enable \e clip automatically. If the view
+ \bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
@@ -2062,12 +2084,12 @@ void QDeclarativeListView::viewportMoved()
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
// reposition highlight
qreal pos = d->highlight->position();
- qreal viewPos = qRound(d->position());
- if (pos > viewPos + d->highlightRangeEnd - 1 - d->highlight->size())
- pos = viewPos + d->highlightRangeEnd - 1 - d->highlight->size();
+ qreal viewPos = d->position();
+ if (pos > viewPos + d->highlightRangeEnd - d->highlight->size())
+ pos = viewPos + d->highlightRangeEnd - d->highlight->size();
if (pos < viewPos + d->highlightRangeStart)
pos = viewPos + d->highlightRangeStart;
- d->highlight->setPosition(pos);
+ d->highlight->setPosition(qRound(pos));
// update current index
int idx = d->snapIndex();
@@ -2124,8 +2146,10 @@ qreal QDeclarativeListView::minYExtent() const
d->minExtent = -d->startPosition();
if (d->header && d->visibleItems.count())
d->minExtent += d->header->size();
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
d->minExtent += d->highlightRangeStart;
+ d->minExtent = qMax(d->minExtent, -(d->endPositionAt(0) - d->highlightRangeEnd + 1));
+ }
d->minExtentDirty = false;
}
@@ -2139,10 +2163,12 @@ qreal QDeclarativeListView::maxYExtent() const
return height();
if (d->maxExtentDirty) {
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- d->maxExtent = -(d->endPosition() - d->highlightRangeEnd);
- d->maxExtent = qMax(d->maxExtent, -(d->positionAt(d->model->count()-1) - d->highlightRangeStart));
- } else
+ d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart);
+ if (d->highlightRangeEnd != d->highlightRangeStart)
+ d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1));
+ } else {
d->maxExtent = -(d->endPosition() - height() + 1);
+ }
if (d->footer)
d->maxExtent -= d->footer->size();
qreal minY = minYExtent();
@@ -2162,8 +2188,10 @@ qreal QDeclarativeListView::minXExtent() const
d->minExtent = -d->startPosition();
if (d->header)
d->minExtent += d->header->size();
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
d->minExtent += d->highlightRangeStart;
+ d->minExtent = qMax(d->minExtent, -(d->endPositionAt(0) - d->highlightRangeEnd + 1));
+ }
d->minExtentDirty = false;
}
@@ -2177,10 +2205,12 @@ qreal QDeclarativeListView::maxXExtent() const
return width();
if (d->maxExtentDirty) {
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- d->maxExtent = -(d->endPosition() - d->highlightRangeEnd);
- d->maxExtent = qMax(d->maxExtent, -(d->positionAt(d->model->count()-1) - d->highlightRangeStart));
- } else
+ d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart);
+ if (d->highlightRangeEnd != d->highlightRangeStart)
+ d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1));
+ } else {
d->maxExtent = -(d->endPosition() - width() + 1);
+ }
if (d->footer)
d->maxExtent -= d->footer->size();
qreal minX = minXExtent();
@@ -2389,7 +2419,7 @@ void QDeclarativeListView::trackedPositionChanged()
if (!d->trackedItem || !d->currentItem)
return;
if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeListViewPrivate::SetIndex) {
- const qreal trackedPos = d->trackedItem->position();
+ const qreal trackedPos = qCeil(d->trackedItem->position());
const qreal viewPos = d->position();
if (d->haveHighlightRange) {
if (d->highlightRange == StrictlyEnforceRange) {
@@ -2823,6 +2853,8 @@ void QDeclarativeListView::animStopped()
{
Q_D(QDeclarativeListView);
d->bufferMode = QDeclarativeListViewPrivate::NoBuffer;
+ if (d->haveHighlightRange && d->highlightRange == QDeclarativeListView::StrictlyEnforceRange)
+ d->updateHighlight();
}
QDeclarativeListViewAttached *QDeclarativeListView::qmlAttachedProperties(QObject *obj)
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 409c228..bdd2c87 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -132,12 +132,15 @@ void QDeclarativeLoaderPrivate::initResize()
\endcode
If the Loader source is changed, any previous items instantiated
- will be destroyed. Setting \c source to an empty string
+ will be destroyed. Setting \c source to an empty string, or setting
+ sourceComponent to \e undefined
will destroy the currently instantiated items, freeing resources
and leaving the Loader empty. For example:
\code
pageLoader.source = ""
+ or
+ pageLoader.sourceComponent = undefined
\endcode
unloads "Page1.qml" and frees resources consumed by it.
@@ -271,13 +274,18 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
}
}
+void QDeclarativeLoader::resetSourceComponent()
+{
+ setSourceComponent(0);
+}
+
void QDeclarativeLoaderPrivate::_q_sourceLoaded()
{
Q_Q(QDeclarativeLoader);
if (component) {
if (!component->errors().isEmpty()) {
- qWarning() << component->errors();
+ QDeclarativeEnginePrivate::warning(qmlEngine(q), component->errors());
emit q->sourceChanged();
emit q->statusChanged();
emit q->progressChanged();
@@ -312,7 +320,7 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
}
} else {
if (!component->errors().isEmpty())
- qWarning() << component->errors();
+ QDeclarativeEnginePrivate::warning(qmlEngine(q), component->errors());
delete obj;
delete ctxt;
source = QUrl();
@@ -325,7 +333,7 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
}
/*!
- \qmlproperty enum Loader::status
+ \qmlproperty enumeration Loader::status
This property holds the status of QML loading. It can be one of:
\list
@@ -383,7 +391,7 @@ qreal QDeclarativeLoader::progress() const
}
/*!
- \qmlproperty enum Loader::resizeMode
+ \qmlproperty enumeration Loader::resizeMode
This property determines how the Loader or item are resized:
\list
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p.h
index 65538a8..e9fd8e9 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p.h
@@ -58,7 +58,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeLoader : public QDeclarativeItem
Q_ENUMS(ResizeMode)
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
- Q_PROPERTY(QDeclarativeComponent *sourceComponent READ sourceComponent WRITE setSourceComponent NOTIFY sourceChanged)
+ Q_PROPERTY(QDeclarativeComponent *sourceComponent READ sourceComponent WRITE setSourceComponent RESET resetSourceComponent NOTIFY sourceChanged)
Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode NOTIFY resizeModeChanged)
Q_PROPERTY(QGraphicsObject *item READ item NOTIFY itemChanged)
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
@@ -73,6 +73,7 @@ public:
QDeclarativeComponent *sourceComponent() const;
void setSourceComponent(QDeclarativeComponent *);
+ void resetSourceComponent();
enum Status { Null, Ready, Loading, Error };
Status status() const;
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index a6cc75e..126d041 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -50,7 +50,8 @@ QT_BEGIN_NAMESPACE
static const int PressAndHoldDelay = 800;
QDeclarativeDrag::QDeclarativeDrag(QObject *parent)
-: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0)
+: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0),
+_active(false)
{
}
@@ -144,6 +145,19 @@ void QDeclarativeDrag::setYmax(qreal m)
emit maximumYChanged();
}
+bool QDeclarativeDrag::active() const
+{
+ return _active;
+}
+
+void QDeclarativeDrag::setActive(bool drag)
+{
+ if (_active == drag)
+ return;
+ _active = drag;
+ emit activeChanged();
+}
+
QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
{
delete drag;
@@ -389,7 +403,8 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
d->dragX = drag()->axis() & QDeclarativeDrag::XAxis;
d->dragY = drag()->axis() & QDeclarativeDrag::YAxis;
}
- d->dragged = false;
+ if (d->drag)
+ d->drag->setActive(false);
setHovered(true);
d->startScene = event->scenePos();
// we should only start timer if pressAndHold is connected to.
@@ -438,7 +453,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
qreal dx = qAbs(curLocalPos.x() - startLocalPos.x());
qreal dy = qAbs(curLocalPos.y() - startLocalPos.y());
if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold)))
- d->dragged = true;
+ d->drag->setActive(true);
if (!keepMouseGrab()) {
if ((!d->dragY && dy < dragThreshold && d->dragX && dx > dragThreshold)
|| (!d->dragX && dx < dragThreshold && d->dragY && dy > dragThreshold)
@@ -447,7 +462,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
}
- if (d->dragX && d->dragged) {
+ if (d->dragX && d->drag->active()) {
qreal x = (curLocalPos.x() - startLocalPos.x()) + d->startX;
if (x < drag()->xmin())
x = drag()->xmin();
@@ -455,7 +470,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
x = drag()->xmax();
drag()->target()->setX(x);
}
- if (d->dragY && d->dragged) {
+ if (d->dragY && d->drag->active()) {
qreal y = (curLocalPos.y() - startLocalPos.y()) + d->startY;
if (y < drag()->ymin())
y = drag()->ymin();
@@ -466,6 +481,9 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
d->moved = true;
}
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ emit mousePositionChanged(&me);
+ me.setX(d->lastPos.x());
+ me.setY(d->lastPos.y());
emit positionChanged(&me);
}
@@ -478,6 +496,8 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
} else {
d->saveEvent(event);
setPressed(false);
+ if (d->drag)
+ d->drag->setActive(false);
// If we don't accept hover, we need to reset containsMouse.
if (!acceptHoverEvents())
setHovered(false);
@@ -518,6 +538,9 @@ void QDeclarativeMouseArea::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
} else {
d->lastPos = event->pos();
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ emit mousePositionChanged(&me);
+ me.setX(d->lastPos.x());
+ me.setY(d->lastPos.y());
emit positionChanged(&me);
}
}
@@ -541,8 +564,10 @@ bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
// state
d->pressed = false;
setKeepMouseGrab(false);
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, false);
+ emit released(&me);
emit pressedChanged();
- //emit hoveredChanged();
+ setHovered(false);
}
}
return rv;
@@ -553,7 +578,8 @@ void QDeclarativeMouseArea::timerEvent(QTimerEvent *event)
Q_D(QDeclarativeMouseArea);
if (event->timerId() == d->pressAndHoldTimer.timerId()) {
d->pressAndHoldTimer.stop();
- if (d->pressed && d->dragged == false && d->hovered == true) {
+ bool dragged = d->drag && d->drag->active();
+ if (d->pressed && dragged == false && d->hovered == true) {
d->longPress = true;
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
emit pressAndHold(&me);
@@ -561,6 +587,18 @@ void QDeclarativeMouseArea::timerEvent(QTimerEvent *event)
}
}
+void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ Q_D(QDeclarativeMouseArea);
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+
+ if (d->lastScenePos.isNull)
+ d->lastScenePos = mapToScene(d->lastPos);
+ else if (newGeometry.x() != oldGeometry.x() || newGeometry.y() != oldGeometry.y())
+ d->lastPos = mapFromScene(d->lastScenePos);
+}
+
/*!
\qmlproperty bool MouseArea::hoverEnabled
This property holds whether hover events are handled.
@@ -641,16 +679,21 @@ void QDeclarativeMouseArea::setAcceptedButtons(Qt::MouseButtons buttons)
bool QDeclarativeMouseArea::setPressed(bool p)
{
Q_D(QDeclarativeMouseArea);
- bool isclick = d->pressed == true && p == false && d->dragged == false && d->hovered == true;
+ bool dragged = d->drag && d->drag->active();
+ bool isclick = d->pressed == true && p == false && dragged == false && d->hovered == true;
if (d->pressed != p) {
d->pressed = p;
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
emit pressed(&me);
- emit positionChanged(&me);
+ me.setX(d->lastPos.x());
+ me.setY(d->lastPos.y());
+ emit mousePositionChanged(&me);
} else {
emit released(&me);
+ me.setX(d->lastPos.x());
+ me.setY(d->lastPos.y());
if (isclick && !d->longPress)
emit clicked(&me);
}
@@ -671,6 +714,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
/*!
\qmlproperty Item MouseArea::drag.target
+ \qmlproperty bool MouseArea::drag.active
\qmlproperty Axis MouseArea::drag.axis
\qmlproperty real MouseArea::drag.minimumX
\qmlproperty real MouseArea::drag.maximumX
@@ -681,6 +725,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
\list
\i \c target specifies the item to drag.
+ \i \c active specifies if the target item is being currently dragged.
\i \c axis specifies whether dragging can be done horizontally (XAxis), vertically (YAxis), or both (XandYAxis)
\i the minimum and maximum properties limit how far the target can be dragged along the corresponding axes.
\endlist
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 58faac1..4f7df62 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -61,6 +61,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDrag : public QObject
Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged)
Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged)
Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged)
+ Q_PROPERTY(bool active READ active NOTIFY activeChanged)
//### consider drag and drop
public:
@@ -84,6 +85,9 @@ public:
qreal ymax() const;
void setYmax(qreal);
+ bool active() const;
+ void setActive(bool);
+
Q_SIGNALS:
void targetChanged();
void axisChanged();
@@ -91,6 +95,7 @@ Q_SIGNALS:
void maximumXChanged();
void minimumYChanged();
void maximumYChanged();
+ void activeChanged();
private:
QGraphicsObject *_target;
@@ -99,6 +104,7 @@ private:
qreal _xmax;
qreal _ymin;
qreal _ymax;
+ bool _active;
Q_DISABLE_COPY(QDeclarativeDrag)
};
@@ -108,8 +114,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeMouseArea : public QDeclarativeItem
{
Q_OBJECT
- Q_PROPERTY(qreal mouseX READ mouseX NOTIFY positionChanged)
- Q_PROPERTY(qreal mouseY READ mouseY NOTIFY positionChanged)
+ Q_PROPERTY(qreal mouseX READ mouseX NOTIFY mousePositionChanged)
+ Q_PROPERTY(qreal mouseY READ mouseY NOTIFY mousePositionChanged)
Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
@@ -144,6 +150,7 @@ Q_SIGNALS:
void enabledChanged();
void acceptedButtonsChanged();
void positionChanged(QDeclarativeMouseEvent *mouse);
+ void mousePositionChanged(QDeclarativeMouseEvent *mouse);
void pressed(QDeclarativeMouseEvent *mouse);
void pressAndHold(QDeclarativeMouseEvent *mouse);
@@ -167,6 +174,9 @@ protected:
bool sceneEvent(QEvent *);
void timerEvent(QTimerEvent *event);
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+
private:
void handlePress();
void handleRelease();
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index 9068c7c..4e909ff 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -67,7 +67,8 @@ class QDeclarativeMouseAreaPrivate : public QDeclarativeItemPrivate
public:
QDeclarativeMouseAreaPrivate()
- : absorb(true), hovered(false), pressed(false), longPress(false), drag(0)
+ : absorb(true), hovered(false), pressed(false), longPress(false),
+ moved(false), drag(0)
{
}
@@ -81,6 +82,7 @@ public:
void saveEvent(QGraphicsSceneMouseEvent *event) {
lastPos = event->pos();
+ lastScenePos = event->scenePos();
lastButton = event->button();
lastButtons = event->buttons();
lastModifiers = event->modifiers();
@@ -99,12 +101,12 @@ public:
bool moved : 1;
bool dragX : 1;
bool dragY : 1;
- bool dragged : 1;
QDeclarativeDrag *drag;
QPointF startScene;
qreal startX;
qreal startY;
QPointF lastPos;
+ QDeclarativeNullableValue<QPointF> lastScenePos;
Qt::MouseButton lastButton;
Qt::MouseButtons lastButtons;
Qt::KeyboardModifiers lastModifiers;
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 4aaa28d..d0a3cd1 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -314,7 +314,7 @@ void QDeclarativePathViewPrivate::regenerate()
\image pathview.gif
- Note that views do not enable \e clip automatically. If the view
+ \bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
index 24b65fa..b5fc979 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -136,7 +136,7 @@ private:
class Q_DECLARATIVE_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner
{
Q_OBJECT
- Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowChanged)
+ Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged)
Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 54c8ab2..3daa83f 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -172,6 +172,8 @@ void QDeclarativeGradient::doUpdate()
\image declarative-rect.png
*/
+int QDeclarativeRectanglePrivate::doUpdateSlotIdx = -1;
+
/*!
\internal
\class QDeclarativeRectangle
@@ -252,11 +254,16 @@ void QDeclarativeRectangle::setGradient(QDeclarativeGradient *gradient)
Q_D(QDeclarativeRectangle);
if (d->gradient == gradient)
return;
+ static int updatedSignalIdx = -1;
+ if (updatedSignalIdx < 0)
+ updatedSignalIdx = QDeclarativeGradient::staticMetaObject.indexOfSignal("updated()");
+ if (d->doUpdateSlotIdx < 0)
+ d->doUpdateSlotIdx = QDeclarativeRectangle::staticMetaObject.indexOfSlot("doUpdate()");
if (d->gradient)
- disconnect(d->gradient, SIGNAL(updated()), this, SLOT(doUpdate()));
+ QMetaObject::disconnect(d->gradient, updatedSignalIdx, this, d->doUpdateSlotIdx);
d->gradient = gradient;
if (d->gradient)
- connect(d->gradient, SIGNAL(updated()), this, SLOT(doUpdate()));
+ QMetaObject::connect(d->gradient, updatedSignalIdx, this, d->doUpdateSlotIdx);
update();
}
@@ -350,7 +357,9 @@ void QDeclarativeRectangle::generateBorderedRect()
Q_D(QDeclarativeRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
- d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
+ // Adding 5 here makes qDrawBorderPixmap() paint correctly with smooth: true
+ // Ideally qDrawBorderPixmap() would be fixed - QTBUG-7999
+ d->rectImage = QPixmap(pw*2 + 5, pw*2 + 5);
d->rectImage.fill(Qt::transparent);
QPainter p(&(d->rectImage));
p.setRenderHint(QPainter::Antialiasing);
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
index 84418bc..001b018 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
@@ -81,12 +81,18 @@ public:
qreal radius;
qreal paintmargin;
QPixmap rectImage;
+ static int doUpdateSlotIdx;
QDeclarativePen *getPen() {
if (!pen) {
Q_Q(QDeclarativeRectangle);
pen = new QDeclarativePen;
- QObject::connect(pen, SIGNAL(penChanged()), q, SLOT(doUpdate()));
+ static int penChangedSignalIdx = -1;
+ if (penChangedSignalIdx < 0)
+ penChangedSignalIdx = QDeclarativePen::staticMetaObject.indexOfSignal("penChanged()");
+ if (doUpdateSlotIdx < 0)
+ doUpdateSlotIdx = QDeclarativeRectangle::staticMetaObject.indexOfSlot("doUpdate()");
+ QMetaObject::connect(pen, penChangedSignalIdx, q, doUpdateSlotIdx);
}
return pen;
}
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
index e68f645..fe89190 100644
--- a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
+++ b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
@@ -175,7 +175,7 @@ QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::stringToRule(cons
if (s == QLatin1String("Round"))
return QDeclarativeBorderImage::Round;
- qWarning() << "Unknown tile rule specified. Using Stretch";
+ qWarning("QDeclarativeGridScaledImage: Invalid tile rule specified. Using Stretch.");
return QDeclarativeBorderImage::Stretch;
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 1fec484..77fb459 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -614,7 +614,7 @@ void QDeclarativeTextEdit::loadCursorDelegate()
d->cursor->setHeight(QFontMetrics(d->font).height());
moveCursorDelegate();
}else{
- qWarning() << QLatin1String("Error loading cursor delegate for TextEdit:") + objectName();
+ qmlInfo(this) << "Error loading cursor delegate.";
}
}
@@ -1076,8 +1076,6 @@ void QDeclarativeTextEditPrivate::updateSelection()
q->selectionEndChanged();
startChange = (lastSelectionStart != control->textCursor().selectionStart());
endChange = (lastSelectionEnd != control->textCursor().selectionEnd());
- if(startChange || endChange)
- qWarning() << "QDeclarativeTextEditPrivate::updateSelection() has failed you.";
}
void QDeclarativeTextEdit::updateSelectionMarkers()
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index e00d333..2161e23 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -779,9 +779,8 @@ void QDeclarativeTextInputPrivate::startCreatingCursor()
}else if(cursorComponent->isLoading()){
q->connect(cursorComponent, SIGNAL(statusChanged(int)),
q, SLOT(createCursor()));
- }else{//isError
- qmlInfo(q) << QDeclarativeTextInput::tr("Could not load cursor delegate");
- qWarning() << cursorComponent->errors();
+ }else {//isError
+ qmlInfo(q, cursorComponent->errors()) << QDeclarativeTextInput::tr("Could not load cursor delegate");
}
}
@@ -789,8 +788,7 @@ void QDeclarativeTextInput::createCursor()
{
Q_D(QDeclarativeTextInput);
if(d->cursorComponent->isError()){
- qmlInfo(this) << tr("Could not load cursor delegate");
- qWarning() << d->cursorComponent->errors();
+ qmlInfo(this, d->cursorComponent->errors()) << tr("Could not load cursor delegate");
return;
}
@@ -801,8 +799,7 @@ void QDeclarativeTextInput::createCursor()
delete d->cursorItem;
d->cursorItem = qobject_cast<QDeclarativeItem*>(d->cursorComponent->create());
if(!d->cursorItem){
- qmlInfo(this) << tr("Could not instantiate cursor delegate");
- //The failed instantiation should print its own error messages
+ qmlInfo(this, d->cursorComponent->errors()) << tr("Could not instantiate cursor delegate");
return;
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 751284d..7fa8cc4 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -262,6 +262,7 @@ public:
}
if (m_roles.count() == 1)
m_roleNames.insert("modelData", m_roles.at(0));
+ m_roleNames.insert("hasModelChildren", 0);
} else if (m_listAccessor) {
m_roleNames.insert("modelData", 0);
if (m_listAccessor->type() == QDeclarativeListAccessor::Instance) {
@@ -473,11 +474,16 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId)
}
} else if (model->m_abstractItemModel) {
model->ensureRoles();
- QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
- if (it != model->m_roleNames.end()) {
- roleToProp.insert(*it, propId);
+ if (propName == "hasModelChildren") {
QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root);
- return model->m_abstractItemModel->data(index, *it);
+ return model->m_abstractItemModel->hasChildren(index);
+ } else {
+ QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
+ if (it != model->m_roleNames.end()) {
+ roleToProp.insert(*it, propId);
+ QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root);
+ return model->m_abstractItemModel->data(index, *it);
+ }
}
}
Q_ASSERT(!"Can never be reached");
@@ -784,34 +790,13 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
\qmlproperty QModelIndex VisualDataModel::rootIndex
QAbstractItemModel provides a heirachical tree of data, whereas
- QML only operates on list data. rootIndex allows the children of
+ QML only operates on list data. \c rootIndex allows the children of
any node in a QAbstractItemModel to be provided by this model.
This property only affects models of type QAbstractItemModel.
\code
// main.cpp
- Q_DECLARE_METATYPE(QModelIndex)
-
- class MyModel : public QDirModel
- {
- Q_OBJECT
- public:
- MyModel(QDeclarativeContext *ctxt) : QDirModel(), context(ctxt) {
- QHash<int,QByteArray> roles = roleNames();
- roles.insert(FilePathRole, "path");
- setRoleNames(roles);
- context->setContextProperty("myModel", this);
- context->setContextProperty("myRoot", QVariant::fromValue(index(0,0,QModelIndex())));
- }
-
- Q_INVOKABLE void setRoot(const QString &path) {
- QModelIndex root = index(path);
- context->setContextProperty("myRoot", QVariant::fromValue(root));
- }
-
- QDeclarativeContext *context;
- };
int main(int argc, char ** argv)
{
@@ -819,7 +804,8 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
QDeclarativeView view;
- MyModel model(view.rootContext());
+ QDirModel model;
+ view.rootContext()->setContextProperty("myModel", &model);
view.setSource(QUrl("qrc:view.qml"));
view.show();
@@ -835,18 +821,18 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
import Qt 4.7
ListView {
+ id: view
width: 200
height: 200
model: VisualDataModel {
model: myModel
- rootIndex: myRoot
delegate: Component {
Rectangle {
- height: 25; width: 100
- Text { text: path }
+ height: 25; width: 200
+ Text { text: filePath }
MouseArea {
anchors.fill: parent;
- onClicked: myModel.setRoot(path)
+ onClicked: if (hasModelChildren) view.model.rootIndex = view.model.modelIndex(index)
}
}
}
@@ -854,19 +840,21 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
}
\endcode
+ \sa modelIndex(), parentModelIndex()
*/
-QModelIndex QDeclarativeVisualDataModel::rootIndex() const
+QVariant QDeclarativeVisualDataModel::rootIndex() const
{
Q_D(const QDeclarativeVisualDataModel);
- return d->m_root;
+ return QVariant::fromValue(d->m_root);
}
-void QDeclarativeVisualDataModel::setRootIndex(const QModelIndex &root)
+void QDeclarativeVisualDataModel::setRootIndex(const QVariant &root)
{
Q_D(QDeclarativeVisualDataModel);
- if (d->m_root != root) {
+ QModelIndex modelIndex = qvariant_cast<QModelIndex>(root);
+ if (d->m_root != modelIndex) {
int oldCount = d->modelCount();
- d->m_root = root;
+ d->m_root = modelIndex;
int newCount = d->modelCount();
if (d->m_delegate && oldCount)
emit itemsRemoved(0, oldCount);
@@ -878,6 +866,47 @@ void QDeclarativeVisualDataModel::setRootIndex(const QModelIndex &root)
}
}
+
+/*!
+ \qmlmethod QModelIndex VisualDataModel::modelIndex(int index)
+
+ QAbstractItemModel provides a heirachical tree of data, whereas
+ QML only operates on list data. This function assists in using
+ tree models in QML.
+
+ Returns a QModelIndex for the specified index.
+ This value can be assigned to rootIndex.
+
+ \sa rootIndex
+*/
+QVariant QDeclarativeVisualDataModel::modelIndex(int idx) const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ if (d->m_abstractItemModel)
+ return QVariant::fromValue(d->m_abstractItemModel->index(idx, 0, d->m_root));
+ return QVariant::fromValue(QModelIndex());
+}
+
+/*!
+ \qmlmethod QModelIndex VisualDataModel::parentModelIndex()
+
+ QAbstractItemModel provides a heirachical tree of data, whereas
+ QML only operates on list data. This function assists in using
+ tree models in QML.
+
+ Returns a QModelIndex for the parent of the current rootIndex.
+ This value can be assigned to rootIndex.
+
+ \sa rootIndex
+*/
+QVariant QDeclarativeVisualDataModel::parentModelIndex() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ if (d->m_abstractItemModel)
+ return QVariant::fromValue(d->m_abstractItemModel->parent(d->m_root));
+ return QVariant::fromValue(QModelIndex());
+}
+
QString QDeclarativeVisualDataModel::part() const
{
Q_D(const QDeclarativeVisualDataModel);
@@ -1011,7 +1040,7 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray
} else {
delete data;
delete ctxt;
- qWarning() << d->m_delegate->errors();
+ qmlInfo(this, d->m_delegate->errors()) << "Error creating delgate";
}
}
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(nobj);
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index d34bcaf..0a9173f 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -150,7 +150,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeVisualDataModel : public QDeclarativeVisu
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate)
Q_PROPERTY(QString part READ part WRITE setPart)
Q_PROPERTY(QObject *parts READ parts CONSTANT)
- Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged)
+ Q_PROPERTY(QVariant rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged)
Q_CLASSINFO("DefaultProperty", "delegate")
public:
QDeclarativeVisualDataModel();
@@ -163,8 +163,11 @@ public:
QDeclarativeComponent *delegate() const;
void setDelegate(QDeclarativeComponent *);
- QModelIndex rootIndex() const;
- void setRootIndex(const QModelIndex &root);
+ QVariant rootIndex() const;
+ void setRootIndex(const QVariant &root);
+
+ Q_INVOKABLE QVariant modelIndex(int idx) const;
+ Q_INVOKABLE QVariant parentModelIndex() const;
QString part() const;
void setPart(const QString &);
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g
index ba9338e..1b66ba0 100644
--- a/src/declarative/qml/parser/qdeclarativejs.g
+++ b/src/declarative/qml/parser/qdeclarativejs.g
@@ -1376,7 +1376,7 @@ case $rule_number: {
} break;
./
-PropertyName: T_IDENTIFIER %prec REDUCE_HERE ;
+PropertyName: T_IDENTIFIER %prec SHIFT_THERE ;
/.
case $rule_number: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
index 52e979a..b87d8f4 100644
--- a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
// This file was generated by qlalr - DO NOT EDIT!
-#include "private/qdeclarativejsgrammar_p.h"
+#include "qdeclarativejsgrammar_p.h"
QT_BEGIN_NAMESPACE
@@ -346,9 +346,9 @@ const short QDeclarativeJSGrammar::action_index [] = {
const short QDeclarativeJSGrammar::action_info [] = {
399, 352, 345, -101, 343, 457, 440, 403, 257, -112,
- -125, -131, -123, -98, -120, 348, -128, 389, 453, 391,
+ -125, -131, -123, 346, -120, 348, -128, 389, 453, 391,
416, 401, 408, 563, -101, -123, 416, -120, 539, -131,
- -98, -112, -125, 348, 257, 99, 71, 645, 621, 101,
+ 346, -112, -125, 348, 257, 99, 71, 645, 621, 101,
-128, 440, 141, 621, 164, 431, 539, 430, 453, 573,
457, 444, 440, 424, 71, 424, 101, 446, 559, 420,
424, 448, 539, 440, 570, 539, 466, 527, 312, 346,
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index 3a0e897..975ad4c 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -484,6 +484,8 @@ int Lexer::lex()
stackToken = -1;
}
+ bool identifierWithEscapedUnicode = false;
+
while (!done) {
switch (state) {
case Start:
@@ -523,7 +525,26 @@ int Lexer::lex()
state = InString;
multiLineString = false;
stringType = current;
+ } else if (current == '\\' && next1 == 'u') {
+ identifierWithEscapedUnicode = true;
+ recordStartPos();
+
+ shift(2); // skip the unicode escape prefix `\u'
+
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ state = InIdentifier;
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ break;
+ }
+
} else if (isIdentLetter(current)) {
+ identifierWithEscapedUnicode = false;
recordStartPos();
record16(current);
state = InIdentifier;
@@ -683,6 +704,21 @@ int Lexer::lex()
if (isIdentLetter(current) || isDecimalDigit(current)) {
record16(current);
break;
+ } else if (current == '\\' && next1 == 'u') {
+ identifierWithEscapedUnicode = true;
+ shift(2); // skip the unicode escape prefix `\u'
+
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ break;
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ break;
+ }
}
setDone(Identifier);
break;
@@ -825,7 +861,11 @@ int Lexer::lex()
delimited = true;
return token;
case Identifier:
- if ((token = findReservedWord(buffer16, pos16)) < 0) {
+ token = -1;
+ if (! identifierWithEscapedUnicode)
+ token = findReservedWord(buffer16, pos16);
+
+ if (token < 0) {
/* TODO: close leak on parse error. same holds true for String */
if (driver)
qsyylval.ustr = driver->intern(buffer16, pos16);
@@ -1104,47 +1144,97 @@ void Lexer::recordStartPos()
bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
{
pos16 = 0;
- bool lastWasEscape = false;
+ pattern = 0;
if (prefix == EqualPrefix)
record16(QLatin1Char('='));
- while (1) {
- if (isLineTerminator() || current == 0) {
+ while (true) {
+ switch (current) {
+
+ case 0: // eof
+ case '\n': case '\r': // line terminator
errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression literal");
return false;
- }
- else if (current != '/' || lastWasEscape == true)
- {
- record16(current);
- lastWasEscape = !lastWasEscape && (current == '\\');
- }
- else {
- if (driver)
+
+ case '/':
+ shift(1);
+
+ if (driver) // create the pattern
pattern = driver->intern(buffer16, pos16);
- else
- pattern = 0;
+
+ // scan the flags
pos16 = 0;
+ flags = 0;
+ while (isIdentLetter(current)) {
+ int flag = Ecma::RegExp::flagFromChar(current);
+ if (flag == 0) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'")
+ .arg(QChar(current));
+ return false;
+ }
+ flags |= flag;
+ record16(current);
+ shift(1);
+ }
+ return true;
+
+ case '\\':
+ // regular expression backslash sequence
+ record16(current);
+ shift(1);
+
+ if (! current || isLineTerminator()) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence");
+ return false;
+ }
+
+ record16(current);
shift(1);
break;
- }
- shift(1);
- }
- flags = 0;
- while (isIdentLetter(current)) {
- int flag = Ecma::RegExp::flagFromChar(current);
- if (flag == 0) {
- errmsg = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'")
- .arg(QChar(current));
- return false;
- }
- flags |= flag;
- record16(current);
- shift(1);
- }
+ case '[':
+ // regular expression class
+ record16(current);
+ shift(1);
+
+ while (current && ! isLineTerminator()) {
+ if (current == ']')
+ break;
+ else if (current == '\\') {
+ // regular expression backslash sequence
+ record16(current);
+ shift(1);
+
+ if (! current || isLineTerminator()) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence");
+ return false;
+ }
+
+ record16(current);
+ shift(1);
+ } else {
+ record16(current);
+ shift(1);
+ }
+ }
+
+ if (current != ']') {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression class");
+ return false;
+ }
+
+ record16(current);
+ shift(1); // skip ]
+ break;
+
+ default:
+ record16(current);
+ shift(1);
+ } // switch
+ } // while
- return true;
+ return false;
}
void Lexer::syncProhibitAutomaticSemicolon()
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index 6e36d4f..d75f0a8 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -100,6 +100,7 @@ int qmlRegisterType()
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
0, 0,
+ QString(),
0, 0, 0, 0, &T::staticMetaObject,
@@ -118,8 +119,10 @@ int qmlRegisterType()
return QDeclarativePrivate::registerType(type);
}
+int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message);
+
template<typename T>
-int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
{
QByteArray name(T::staticMetaObject.className());
@@ -132,6 +135,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
0, 0,
+ reason,
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -164,6 +168,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
sizeof(T), QDeclarativePrivate::createInto<T>,
+ QString(),
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -196,6 +201,7 @@ int qmlRegisterExtendedType()
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
0, 0,
+ QString(),
0, 0, 0, 0, &T::staticMetaObject,
@@ -236,6 +242,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor,
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
sizeof(T), QDeclarativePrivate::createInto<T>,
+ QString(),
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -276,9 +283,9 @@ int qmlRegisterInterface(const char *typeName)
template<typename T>
int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
- const char *qmlName, const char *typeName, QDeclarativeCustomParser *parser)
+ const char *qmlName, QDeclarativeCustomParser *parser)
{
- QByteArray name(typeName);
+ QByteArray name(T::staticMetaObject.className());
QByteArray pointerName(name + '*');
QByteArray listName("QDeclarativeListProperty<" + name + ">");
@@ -289,6 +296,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
qRegisterMetaType<T *>(pointerName.constData()),
qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
sizeof(T), QDeclarativePrivate::createInto<T>,
+ QString(),
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 25492ac..d44e7fb 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -156,6 +156,9 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
QScriptValue scriptValue = d->scriptValue(0, &isUndefined);
if (data->property.propertyTypeCategory() == QDeclarativeProperty::List) {
value = ep->scriptValueToVariant(scriptValue, qMetaTypeId<QList<QObject *> >());
+ } else if (scriptValue.isNull() &&
+ data->property.propertyTypeCategory() == QDeclarativeProperty::Object) {
+ value = QVariant::fromValue((QObject *)0);
} else {
value = ep->scriptValueToVariant(scriptValue, data->property.propertyType());
if (value.userType() == QMetaType::QObjectStar && !qvariant_cast<QObject*>(value)) {
@@ -168,6 +171,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
}
}
+
if (data->error.isValid()) {
} else if (isUndefined && data->property.isResettable()) {
@@ -210,8 +214,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
}
if (data->error.isValid()) {
- if (!data->addError(ep))
- qWarning().nospace() << qPrintable(this->error().toString());
+ if (!data->addError(ep)) ep->warning(this->error());
} else {
data->removeError();
}
@@ -358,8 +361,10 @@ void QDeclarativeAbstractBinding::removeFromObject()
void QDeclarativeAbstractBinding::clear()
{
- if (m_mePtr)
+ if (m_mePtr) {
*m_mePtr = 0;
+ m_mePtr = 0;
+ }
}
QString QDeclarativeAbstractBinding::expression() const
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
index 8c7a977..00a93cc 100644
--- a/src/declarative/qml/qdeclarativeboundsignal.cpp
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -179,7 +179,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
if (m_expression && m_expression->engine()) {
QDeclarativeExpressionPrivate::get(m_expression)->value(m_params);
if (m_expression && m_expression->hasError())
- qWarning().nospace() << qPrintable(m_expression->error().toString());
+ QDeclarativeEnginePrivate::warning(m_expression->engine(), m_expression->error());
}
if (m_params) m_params->clearValues();
return -1;
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 6fdf706..6596aba 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -888,13 +888,6 @@ void QDeclarativeCompiledBindingsPrivate::findgeneric(Register *output,
return;
}
- for (int ii = 0; ii < context->scripts.count(); ++ii) {
- QScriptValue function = QScriptDeclarativeClass::function(context->scripts.at(ii), name);
- if (function.isValid()) {
- qFatal("Binding optimizer resolved name to QScript method");
- }
- }
-
if (QObject *root = context->contextObject) {
if (findproperty(root, output, enginePriv, subIdx, name, isTerminal))
@@ -938,7 +931,7 @@ static void throwException(int id, QDeclarativeDelayedError *error,
error->error.setColumn(-1);
}
if (!context->engine || !error->addError(QDeclarativeEnginePrivate::get(context->engine)))
- qWarning() << error->error;
+ QDeclarativeEnginePrivate::warning(context->engine, error->error);
}
static void dumpInstruction(const Instr *instr)
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 065009a..1727687 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -571,8 +571,12 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
QDeclarativeScriptParser::TypeReference *parserRef = unit->data.referencedTypes().at(ii);
if (tref.type) {
ref.type = tref.type;
- if (!ref.type->isCreatable())
- COMPILE_EXCEPTION(parserRef->refObjects.first(), tr( "Element is not creatable."));
+ if (!ref.type->isCreatable()) {
+ QString err = ref.type->noCreationReason();
+ if (err.isEmpty())
+ err = tr( "Element is not creatable.");
+ COMPILE_EXCEPTION(parserRef->refObjects.first(), err);
+ }
} else if (tref.unit) {
ref.component = tref.unit->toComponent(engine);
@@ -733,10 +737,6 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt)
return true;
}
- // Build any script blocks for this type
- for (int ii = 0; ii < obj->scriptBlockObjects.count(); ++ii)
- COMPILE_CHECK(buildScript(obj, obj->scriptBlockObjects.at(ii)));
-
// Object instantiations reset the binding context
BindingContext objCtxt(obj);
@@ -868,12 +868,14 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt)
defaultProperty->release();
// Compile custom parser parts
- if (isCustomParser && !customProps.isEmpty()) {
+ if (isCustomParser/* && !customProps.isEmpty()*/) {
QDeclarativeCustomParser *cp = output->types.at(obj->type).type->customParser();
cp->clearErrors();
cp->compiler = this;
+ cp->object = obj;
obj->custom = cp->compile(customProps);
cp->compiler = 0;
+ cp->object = 0;
foreach (QDeclarativeError err, cp->errors()) {
err.setUrl(output->url);
exceptions << err;
@@ -961,17 +963,6 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
output->bytecode << id;
}
- // Set any script blocks
- for (int ii = 0; ii < obj->scripts.count(); ++ii) {
- QDeclarativeInstruction script;
- script.type = QDeclarativeInstruction::StoreScript;
- script.line = 0; // ###
- int idx = output->scripts.count();
- output->scripts << obj->scripts.at(ii);
- script.storeScript.value = idx;
- output->bytecode << script;
- }
-
// Begin the class
if (obj->parserStatusCast != -1) {
QDeclarativeInstruction begin;
@@ -1177,9 +1168,6 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj,
(obj->properties.count() == 1 && obj->properties.begin().key() != "id"))
COMPILE_EXCEPTION(*obj->properties.begin(), tr("Component elements may not contain properties other than id"));
- if (!obj->scriptBlockObjects.isEmpty())
- COMPILE_EXCEPTION(obj->scriptBlockObjects.first(), tr("Component elements may not contain script blocks"));
-
if (obj->properties.count())
idProp = *obj->properties.begin();
@@ -1203,6 +1191,13 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj,
(obj->defaultProperty->values.count() == 1 && !obj->defaultProperty->values.first()->object)))
COMPILE_EXCEPTION(obj, tr("Invalid component body specification"));
+ if (!obj->dynamicProperties.isEmpty())
+ COMPILE_EXCEPTION(obj, tr("Component objects cannot declare new properties."));
+ if (!obj->dynamicSignals.isEmpty())
+ COMPILE_EXCEPTION(obj, tr("Component objects cannot declare new signals."));
+ if (!obj->dynamicSlots.isEmpty())
+ COMPILE_EXCEPTION(obj, tr("Component objects cannot declare new functions."));
+
Object *root = 0;
if (obj->defaultProperty && obj->defaultProperty->values.count())
root = obj->defaultProperty->values.first()->object;
@@ -1216,94 +1211,6 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj,
return true;
}
-bool QDeclarativeCompiler::buildScript(QDeclarativeParser::Object *obj, QDeclarativeParser::Object *script)
-{
- qWarning().nospace() << qPrintable(output->url.toString()) << ":" << obj->location.start.line << ":" << obj->location.start.column << ": Script blocks have been deprecated. Support will be removed entirely shortly.";
-
- Object::ScriptBlock scriptBlock;
-
- if (script->properties.count() == 1 &&
- script->properties.begin().key() == QByteArray("source")) {
-
- Property *source = *script->properties.begin();
- if (script->defaultProperty)
- COMPILE_EXCEPTION(source, tr("Invalid Script block. Specify either the source property or inline script"));
-
- if (source->value || source->values.count() != 1 ||
- source->values.at(0)->object || !source->values.at(0)->value.isStringList())
- COMPILE_EXCEPTION(source, tr("Invalid Script source value"));
-
- QStringList sources = source->values.at(0)->value.asStringList();
-
- for (int jj = 0; jj < sources.count(); ++jj) {
- QString sourceUrl = output->url.resolved(QUrl(sources.at(jj))).toString();
- QString scriptCode;
- int lineNumber = 1;
-
- for (int ii = 0; ii < unit->resources.count(); ++ii) {
- if (unit->resources.at(ii)->url == sourceUrl) {
- scriptCode = QString::fromUtf8(unit->resources.at(ii)->data);
- break;
- }
- }
-
- if (!scriptCode.isEmpty()) {
- scriptBlock.codes.append(scriptCode);
- scriptBlock.files.append(sourceUrl);
- scriptBlock.lineNumbers.append(lineNumber);
- scriptBlock.pragmas.append(Object::ScriptBlock::None);
- }
- }
-
- } else if (!script->properties.isEmpty()) {
- COMPILE_EXCEPTION(*script->properties.begin(), tr("Properties cannot be set on Script block"));
- } else if (script->defaultProperty) {
-
- QString scriptCode;
- int lineNumber = 1;
- QString sourceUrl = output->url.toString();
-
- QDeclarativeParser::Location currentLocation;
-
- for (int ii = 0; ii < script->defaultProperty->values.count(); ++ii) {
- Value *v = script->defaultProperty->values.at(ii);
- if (lineNumber == 1)
- lineNumber = v->location.start.line;
- if (v->object || !v->value.isString())
- COMPILE_EXCEPTION(v, tr("Invalid Script block"));
-
- if (ii == 0) {
- currentLocation = v->location.start;
- scriptCode.append(QString(currentLocation.column, QLatin1Char(' ')));
- }
-
- while (currentLocation.line < v->location.start.line) {
- scriptCode.append(QLatin1Char('\n'));
- currentLocation.line++;
- currentLocation.column = 0;
- }
-
- scriptCode.append(QString(v->location.start.column - currentLocation.column, QLatin1Char(' ')));
-
- scriptCode += v->value.asString();
- currentLocation = v->location.end;
- currentLocation.column++;
- }
-
- if (!scriptCode.isEmpty()) {
- scriptBlock.codes.append(scriptCode);
- scriptBlock.files.append(sourceUrl);
- scriptBlock.lineNumbers.append(lineNumber);
- scriptBlock.pragmas.append(Object::ScriptBlock::None);
- }
- }
-
- if (!scriptBlock.codes.isEmpty())
- obj->scripts << scriptBlock;
-
- return true;
-}
-
bool QDeclarativeCompiler::buildComponentFromRoot(QDeclarativeParser::Object *obj,
const BindingContext &ctxt)
{
@@ -1351,7 +1258,7 @@ bool QDeclarativeCompiler::buildSubObject(Object *obj, const BindingContext &ctx
int QDeclarativeCompiler::componentTypeRef()
{
- QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/Component",4,6);
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/Component",4,7);
for (int ii = output->types.count() - 1; ii >= 0; --ii) {
if (output->types.at(ii).type == t)
return ii;
@@ -2902,25 +2809,6 @@ bool QDeclarativeCompiler::canCoerce(int to, QDeclarativeParser::Object *from)
return false;
}
-/*!
- Returns true if from can be assigned to a (QObject) property of type
- to.
-*/
-bool QDeclarativeCompiler::canCoerce(int to, int from)
-{
- const QMetaObject *toMo =
- QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(to);
- const QMetaObject *fromMo =
- QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(from);
-
- while (fromMo) {
- if (QDeclarativePropertyPrivate::equal(fromMo, toMo))
- return true;
- fromMo = fromMo->superClass();
- }
- return false;
-}
-
QDeclarativeType *QDeclarativeCompiler::toQmlType(QDeclarativeParser::Object *from)
{
// ### Optimize
diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
index 867db2c..fefab7a 100644
--- a/src/declarative/qml/qdeclarativecompiler_p.h
+++ b/src/declarative/qml/qdeclarativecompiler_p.h
@@ -186,7 +186,6 @@ private:
bool buildObject(QDeclarativeParser::Object *obj, const BindingContext &);
- bool buildScript(QDeclarativeParser::Object *obj, QDeclarativeParser::Object *script);
bool buildComponent(QDeclarativeParser::Object *obj, const BindingContext &);
bool buildSubObject(QDeclarativeParser::Object *obj, const BindingContext &);
bool buildSignal(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj,
@@ -275,7 +274,6 @@ private:
static QDeclarativeType *toQmlType(QDeclarativeParser::Object *from);
bool canCoerce(int to, QDeclarativeParser::Object *from);
- bool canCoerce(int to, int from);
QStringList deferredProperties(QDeclarativeParser::Object *);
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 3e4651c..c86f089 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -530,10 +530,8 @@ QScriptValue QDeclarativeComponent::createObject()
{
Q_D(QDeclarativeComponent);
QDeclarativeContext* ctxt = creationContext();
- if(!ctxt){
- qWarning() << QLatin1String("createObject can only be used in QML");
+ if(!ctxt)
return QScriptValue();
- }
QObject* ret = create(ctxt);
if (!ret)
return QScriptValue();
@@ -613,17 +611,17 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
{
Q_Q(QDeclarativeComponent);
if (!context) {
- qWarning("QDeclarativeComponent::beginCreate(): Cannot create a component in a null context");
+ qWarning("QDeclarativeComponent: Cannot create a component in a null context");
return 0;
}
if (!context->isValid()) {
- qWarning("QDeclarativeComponent::beginCreate(): Cannot create a component in an invalid context");
+ qWarning("QDeclarativeComponent: Cannot create a component in an invalid context");
return 0;
}
if (context->engine != engine) {
- qWarning("QDeclarativeComponent::beginCreate(): Must create component in context from the same QDeclarativeEngine");
+ qWarning("QDeclarativeComponent: Must create component in context from the same QDeclarativeEngine");
return 0;
}
@@ -766,7 +764,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri
enginePriv->inProgressCreations--;
if (0 == enginePriv->inProgressCreations) {
while (enginePriv->erroredBindings) {
- qWarning().nospace() << qPrintable(enginePriv->erroredBindings->error.toString());
+ enginePriv->warning(enginePriv->erroredBindings->error);
enginePriv->erroredBindings->removeError();
}
}
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
index 6ee5070..526a319 100644
--- a/src/declarative/qml/qdeclarativecomponent.h
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -99,8 +99,6 @@ public:
virtual QObject *beginCreate(QDeclarativeContext *);
virtual void completeCreate();
- Q_INVOKABLE QScriptValue createObject();
-
void loadUrl(const QUrl &url);
void setData(const QByteArray &, const QUrl &baseUrl);
@@ -114,6 +112,7 @@ Q_SIGNALS:
protected:
QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
+ Q_INVOKABLE QScriptValue createObject();
private:
QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, int, QObject *parent);
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 133b71f..adeb7a5 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -341,7 +341,6 @@ static QString toLocalFileOrQrc(const QUrl& url)
if (url.scheme() == QLatin1String("qrc")) {
if (url.authority().isEmpty())
return QLatin1Char(':') + url.path();
- qWarning() << "Invalid url:" << url.toString() << "authority" << url.authority() << "not known.";
return QString();
}
return url.toLocalFile();
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 6657fea..ae4223e 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -114,7 +114,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
\endcode
All properties added explicitly by QDeclarativeContext::setContextProperty() take
- precedence over context object's properties.
+ precedence over the context object's properties.
Contexts form a hierarchy. The root of this heirarchy is the QDeclarativeEngine's
\l {QDeclarativeEngine::rootContext()}{root context}. A component instance can
@@ -140,6 +140,11 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
While QML objects instantiated in a context are not strictly owned by that
context, their bindings are. If a context is destroyed, the property bindings of
outstanding QML objects will stop evaluating.
+
+ \note Setting the context object or adding new context properties after an object
+ has been created in that context is an expensive operation (essentially forcing all bindings
+ to reevaluate). Thus whenever possible you should complete "setup" of the context
+ before using it to create any objects.
*/
/*! \internal */
@@ -203,6 +208,12 @@ QDeclarativeContext::~QDeclarativeContext()
d->data->destroy();
}
+/*!
+ Returns whether the context is valid.
+
+ To be valid, a context must have a engine, and it's contextObject(), if any,
+ must not have been deleted.
+*/
bool QDeclarativeContext::isValid() const
{
Q_D(const QDeclarativeContext);
@@ -655,7 +666,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
if (scriptEngine->hasUncaughtException()) {
QDeclarativeError error;
QDeclarativeExpressionPrivate::exceptionToError(scriptEngine, error);
- qWarning().nospace() << qPrintable(error.toString());
+ enginePriv->warning(error);
}
scriptEngine->popContext();
@@ -681,7 +692,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
if (scriptEngine->hasUncaughtException()) {
QDeclarativeError error;
QDeclarativeExpressionPrivate::exceptionToError(scriptEngine, error);
- qWarning().nospace() << qPrintable(error.toString());
+ enginePriv->warning(error);
}
scriptEngine->popContext();
@@ -691,39 +702,6 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
}
}
-void QDeclarativeContextData::addScript(const QDeclarativeParser::Object::ScriptBlock &script,
- QObject *scopeObject)
-{
- if (!engine)
- return;
-
- QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
- QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
-
- QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
-
- scriptContext->pushScope(enginePriv->contextClass->newContext(this, scopeObject));
- scriptContext->pushScope(enginePriv->globalClass->globalObject());
-
- QScriptValue scope = scriptEngine->newObject();
- scriptContext->setActivationObject(scope);
- scriptContext->pushScope(scope);
-
- for (int ii = 0; ii < script.codes.count(); ++ii) {
- scriptEngine->evaluate(script.codes.at(ii), script.files.at(ii), script.lineNumbers.at(ii));
-
- if (scriptEngine->hasUncaughtException()) {
- QDeclarativeError error;
- QDeclarativeExpressionPrivate::exceptionToError(scriptEngine, error);
- qWarning().nospace() << qPrintable(error.toString());
- }
- }
-
- scriptEngine->popContext();
-
- scripts.append(scope);
-}
-
void QDeclarativeContextData::setIdProperty(int idx, QObject *obj)
{
idValues[idx] = obj;
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index 77a6d94..c7fb099 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -145,10 +145,8 @@ public:
QObject *contextObject;
// Any script blocks that exist on this context
- QList<QScriptValue> scripts;
QList<QScriptValue> importedScripts;
void addImportedScript(const QDeclarativeParser::Object::ScriptBlock &script);
- void addScript(const QDeclarativeParser::Object::ScriptBlock &script, QObject *scopeObject);
// Context base url
QUrl url;
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
index 461fab5..1336a1a 100644
--- a/src/declarative/qml/qdeclarativecontextscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
@@ -189,14 +189,6 @@ QDeclarativeContextScriptClass::queryProperty(QDeclarativeContextData *bindConte
}
}
- for (int ii = 0; ii < bindContext->scripts.count(); ++ii) {
- lastFunction = QScriptDeclarativeClass::function(bindContext->scripts.at(ii), name);
- if (lastFunction.isValid()) {
- lastContext = bindContext;
- return QScriptClass::HandlesReadAccess;
- }
- }
-
if (scopeObject) {
QScriptClass::QueryFlags rv =
ep->objectClass->queryProperty(scopeObject, name, flags, bindContext,
diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp
index 1a97315..472a883 100644
--- a/src/declarative/qml/qdeclarativecustomparser.cpp
+++ b/src/declarative/qml/qdeclarativecustomparser.cpp
@@ -89,6 +89,8 @@ using namespace QDeclarativeParser;
by \a data, which is a block of data previously returned by a call
to compile().
+ Errors should be reported using qmlInfo(object).
+
The \a object will be an instance of the TypeClass specified by QML_REGISTER_CUSTOM_TYPE.
*/
@@ -235,6 +237,24 @@ void QDeclarativeCustomParser::clearErrors()
}
/*!
+ Reports an error with the given \a description.
+
+ This can only be used during the compile() step. For errors during setCustomData(), use qmlInfo().
+
+ An error is generated referring to the position of the element in the source file.
+*/
+void QDeclarativeCustomParser::error(const QString& description)
+{
+ Q_ASSERT(object);
+ QDeclarativeError error;
+ QString exceptionDescription;
+ error.setLine(object->location.start.line);
+ error.setColumn(object->location.start.column);
+ error.setDescription(description);
+ exceptions << error;
+}
+
+/*!
Reports an error in parsing \a prop, with the given \a description.
An error is generated referring to the position of \a node in the source file.
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h
index da0358a..0e397c5 100644
--- a/src/declarative/qml/qdeclarativecustomparser_p.h
+++ b/src/declarative/qml/qdeclarativecustomparser_p.h
@@ -113,7 +113,7 @@ private:
class Q_DECLARATIVE_EXPORT QDeclarativeCustomParser
{
public:
- QDeclarativeCustomParser() : compiler(0) {}
+ QDeclarativeCustomParser() : compiler(0), object(0) {}
virtual ~QDeclarativeCustomParser() {}
void clearErrors();
@@ -124,6 +124,7 @@ public:
QList<QDeclarativeError> errors() const { return exceptions; }
protected:
+ void error(const QString& description);
void error(const QDeclarativeCustomParserProperty&, const QString& description);
void error(const QDeclarativeCustomParserNode&, const QString& description);
@@ -132,6 +133,7 @@ protected:
private:
QList<QDeclarativeError> exceptions;
QDeclarativeCompiler *compiler;
+ QDeclarativeParser::Object *object;
friend class QDeclarativeCompiler;
};
diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h
index 2ddd7e5..4a56536 100644
--- a/src/declarative/qml/qdeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedata_p.h
@@ -75,7 +75,7 @@ public:
: ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false),
context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0),
bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0),
- attachedProperties(0), scriptValue(0), propertyCache(0), guards(0) {
+ attachedProperties(0), scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0) {
init();
}
@@ -128,6 +128,7 @@ public:
// ### Can we make this QScriptValuePrivate so we incur no additional allocation
// cost?
QScriptValue *scriptValue;
+ quint32 objectDataRefCount;
QDeclarativePropertyCache *propertyCache;
QDeclarativeGuard<QObject> *guards;
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
index 1e3b37b..3e05853 100644
--- a/src/declarative/qml/qdeclarativedirparser.cpp
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -170,10 +170,9 @@ bool QDeclarativeDirParser::parse()
const int dotIndex = version.indexOf(QLatin1Char('.'));
if (dotIndex == -1) {
- qWarning() << "expected '.'"; // ### use reportError
+ reportError(lineNumber, -1, QLatin1String("expected '.'"));
} else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) {
- qWarning() << "unexpected '.'"; // ### use reportError
-
+ reportError(lineNumber, -1, QLatin1String("unexpected '.'"));
} else {
bool validVersionNumber = false;
const int majorVersion = version.left(dotIndex).toInt(&validVersionNumber);
@@ -189,8 +188,8 @@ bool QDeclarativeDirParser::parse()
}
}
} else {
- // ### use reportError
- qWarning() << "a component declaration requires 3 arguments, but" << (sectionCount + 1) << "were provided";
+ reportError(lineNumber, -1,
+ QString::fromUtf8("a component declaration requires 3 arguments, but %1 were provided").arg(sectionCount + 1));
}
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 96145fb..8eae120 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -144,19 +144,19 @@ static bool qt_QmlQtModule_registered = false;
void QDeclarativeEnginePrivate::defineModule()
{
- qmlRegisterType<QDeclarativeComponent>("Qt",4,6,"Component");
- qmlRegisterType<QObject>("Qt",4,6,"QtObject");
- qmlRegisterType<QDeclarativeWorkerScript>("Qt",4,6,"WorkerScript");
+ qmlRegisterType<QDeclarativeComponent>("Qt",4,7,"Component");
+ qmlRegisterType<QObject>("Qt",4,7,"QtObject");
+ qmlRegisterType<QDeclarativeWorkerScript>("Qt",4,7,"WorkerScript");
qmlRegisterType<QDeclarativeBinding>();
}
QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
-: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
- contextClass(0), sharedContext(0), sharedScope(0), objectClass(0), valueTypeClass(0),
- globalClass(0), cleanup(0), erroredBindings(0), inProgressCreations(0),
- scriptEngine(this), workerScriptEngine(0), componentAttached(0), inBeginCreate(false),
- networkAccessManager(0), networkAccessManagerFactory(0),
+: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
+ outputWarningsToStdErr(true), contextClass(0), sharedContext(0), sharedScope(0),
+ objectClass(0), valueTypeClass(0), globalClass(0), cleanup(0), erroredBindings(0),
+ inProgressCreations(0), scriptEngine(this), workerScriptEngine(0), componentAttached(0),
+ inBeginCreate(false), networkAccessManager(0), networkAccessManagerFactory(0),
typeManager(e), uniqueId(1)
{
if (!qt_QmlQtModule_registered) {
@@ -216,8 +216,6 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace(QLatin1Char('/'), QDir::separator())
+ QDir::separator() + QLatin1String("QML")
+ QDir::separator() + QLatin1String("OfflineStorage");
-#else
- qWarning("offlineStoragePath is not set by default with QT_NO_DESKTOPSERVICES");
#endif
qt_add_qmlxmlhttprequest(this);
@@ -256,19 +254,19 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
qtObject.setProperty(QLatin1String("quit"), newFunction(QDeclarativeEnginePrivate::quit, 0));
qtObject.setProperty(QLatin1String("resolvedUrl"),newFunction(QDeclarativeScriptEngine::resolvedUrl, 1));
+ if (mainthread) {
+ qtObject.setProperty(QLatin1String("createQmlObject"),
+ newFunction(QDeclarativeEnginePrivate::createQmlObject, 1));
+ qtObject.setProperty(QLatin1String("createComponent"),
+ newFunction(QDeclarativeEnginePrivate::createComponent, 1));
+ }
+
//firebug/webkit compat
QScriptValue consoleObject = newObject();
consoleObject.setProperty(QLatin1String("log"),newFunction(QDeclarativeEnginePrivate::consoleLog, 1));
consoleObject.setProperty(QLatin1String("debug"),newFunction(QDeclarativeEnginePrivate::consoleLog, 1));
globalObject().setProperty(QLatin1String("console"), consoleObject);
- if (mainthread) {
- globalObject().setProperty(QLatin1String("createQmlObject"),
- newFunction(QDeclarativeEnginePrivate::createQmlObject, 1));
- globalObject().setProperty(QLatin1String("createComponent"),
- newFunction(QDeclarativeEnginePrivate::createComponent, 1));
- }
-
// translation functions need to be installed
// before the global script class is constructed (QTBUG-6437)
installTranslatorFunctions();
@@ -355,7 +353,7 @@ void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o)
QObjectPrivate *p = QObjectPrivate::get(o);
Q_ASSERT(p->declarativeData);
QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData);
- if (d->ownContext)
+ if (d->ownContext)
d->context->destroy();
}
@@ -390,15 +388,13 @@ void QDeclarativeEnginePrivate::init()
qmlEngineDebugServer();
isDebugging = true;
QDeclarativeEngineDebugServer::addEngine(q);
-
- qmlEngineDebugServer()->waitForClients();
}
}
QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine()
{
Q_Q(QDeclarativeEngine);
- if (!workerScriptEngine)
+ if (!workerScriptEngine)
workerScriptEngine = new QDeclarativeWorkerScriptEngine(q);
return workerScriptEngine;
}
@@ -423,7 +419,7 @@ QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine
QDeclarativeComponent component(&engine);
component.setData("import Qt 4.7\nText { text: \"Hello world!\" }", QUrl());
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
-
+
//add item to view, etc
...
\endcode
@@ -655,6 +651,34 @@ void QDeclarativeEngine::setBaseUrl(const QUrl &url)
}
/*!
+ Returns true if warning messages will be output to stderr in addition
+ to being emitted by the warnings() signal, otherwise false.
+
+ The default value is true.
+*/
+bool QDeclarativeEngine::outputWarningsToStandardError() const
+{
+ Q_D(const QDeclarativeEngine);
+ return d->outputWarningsToStdErr;
+}
+
+/*!
+ Set whether warning messages will be output to stderr to \a enabled.
+
+ If \a enabled is true, any warning messages generated by QML will be
+ output to stderr and emitted by the warnings() signal. If \a enabled
+ is false, on the warnings() signal will be emitted. This allows
+ applications to handle warning output themselves.
+
+ The default value is true.
+*/
+void QDeclarativeEngine::setOutputWarningsToStandardError(bool enabled)
+{
+ Q_D(QDeclarativeEngine);
+ d->outputWarningsToStdErr = enabled;
+}
+
+/*!
Returns the QDeclarativeContext for the \a object, or 0 if no
context has been set.
@@ -743,6 +767,9 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex
*/
void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership ownership)
{
+ if (!object)
+ return;
+
QDeclarativeData *ddata = QDeclarativeData::get(object, true);
if (!ddata)
return;
@@ -756,8 +783,11 @@ void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership own
*/
QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject *object)
{
+ if (!object)
+ return CppOwnership;
+
QDeclarativeData *ddata = QDeclarativeData::get(object, false);
- if (!ddata)
+ if (!ddata)
return CppOwnership;
else
return ddata->indestructible?CppOwnership:JavaScriptOwnership;
@@ -780,8 +810,7 @@ void qmlExecuteDeferred(QObject *object)
QDeclarativeComponentPrivate::complete(ep, &state);
if (!state.errors.isEmpty())
- qWarning() << state.errors;
-
+ ep->warning(state.errors);
}
}
@@ -821,7 +850,7 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
return rv;
}
-QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
+QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
const QMetaObject *attachedMetaObject, bool create)
{
if (*idCache == -1)
@@ -840,7 +869,7 @@ void QDeclarativeData::destroyed(QObject *object)
if (attachedProperties)
delete attachedProperties;
- if (nextContextObject)
+ if (nextContextObject)
nextContextObject->prevContextObject = prevContextObject;
if (prevContextObject)
*prevContextObject = nextContextObject;
@@ -887,7 +916,7 @@ void QDeclarativeData::parentChanged(QObject *, QObject *parent)
bool QDeclarativeData::hasBindingBit(int bit) const
{
- if (bindingBitsSize > bit)
+ if (bindingBitsSize > bit)
return bindingBits[bit / 32] & (1 << (bit % 32));
else
return false;
@@ -895,7 +924,7 @@ bool QDeclarativeData::hasBindingBit(int bit) const
void QDeclarativeData::clearBindingBit(int bit)
{
- if (bindingBitsSize > bit)
+ if (bindingBitsSize > bit)
bindingBits[bit / 32] &= ~(1 << (bit % 32));
}
@@ -908,10 +937,10 @@ void QDeclarativeData::setBindingBit(QObject *obj, int bit)
int arraySize = (props + 31) / 32;
int oldArraySize = bindingBitsSize / 32;
- bindingBits = (quint32 *)realloc(bindingBits,
+ bindingBits = (quint32 *)realloc(bindingBits,
arraySize * sizeof(quint32));
- memset(bindingBits + oldArraySize,
+ memset(bindingBits + oldArraySize,
0x00,
sizeof(quint32) * (arraySize - oldArraySize));
@@ -957,7 +986,7 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS
Q_ASSERT(context);
if(ctxt->argumentCount() != 1) {
- return engine->nullValue();
+ return ctxt->throwError("Qt.createComponent(): Invalid arguments");
}else{
QString arg = ctxt->argument(0).toString();
if (arg.isEmpty())
@@ -977,7 +1006,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
QDeclarativeEngine* activeEngine = activeEnginePriv->q_func();
if(ctxt->argumentCount() < 2 || ctxt->argumentCount() > 3)
- return engine->nullValue();
+ return ctxt->throwError("Qt.createQmlObject(): Invalid arguments");
QDeclarativeContextData* context = activeEnginePriv->getContext(ctxt);
Q_ASSERT(context);
@@ -996,36 +1025,53 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
url = context->resolvedUrl(url);
QObject *parentArg = activeEnginePriv->objectClass->toQObject(ctxt->argument(1));
- if(!parentArg)
- return engine->nullValue();
+ if(!parentArg)
+ return ctxt->throwError("Qt.createQmlObject(): Missing parent object");
QDeclarativeComponent component(activeEngine);
component.setData(qml.toUtf8(), url);
if(component.isError()) {
QList<QDeclarativeError> errors = component.errors();
- qWarning().nospace() << "QDeclarativeEngine::createQmlObject():";
- foreach (const QDeclarativeError &error, errors)
- qWarning().nospace() << " " << error;
-
- return engine->nullValue();
+ QString errstr = QLatin1String("Qt.createQmlObject() failed to create object: ");
+ QScriptValue arr = ctxt->engine()->newArray(errors.length());
+ int i = 0;
+ foreach (const QDeclarativeError &error, errors){
+ errstr += QLatin1String(" ") + error.toString() + QLatin1String("\n");
+ QScriptValue qmlErrObject = ctxt->engine()->newObject();
+ qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
+ qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
+ qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
+ qmlErrObject.setProperty("message", QScriptValue(error.description()));
+ arr.setProperty(i++, qmlErrObject);
+ }
+ QScriptValue err = ctxt->throwError(errstr);
+ err.setProperty("qmlErrors",arr);
+ return err;
}
- if (!component.isReady()) {
- qWarning().nospace() << "QDeclarativeEngine::createQmlObject(): Component is not ready";
-
- return engine->nullValue();
- }
+ if (!component.isReady())
+ return ctxt->throwError("Qt.createQmlObject(): Component is not ready");
QObject *obj = component.create(context->asQDeclarativeContext());
if(component.isError()) {
QList<QDeclarativeError> errors = component.errors();
- qWarning().nospace() << "QDeclarativeEngine::createQmlObject():";
- foreach (const QDeclarativeError &error, errors)
- qWarning().nospace() << " " << error;
-
- return engine->nullValue();
+ QString errstr = QLatin1String("Qt.createQmlObject() failed to create object: ");
+ QScriptValue arr = ctxt->engine()->newArray(errors.length());
+ int i = 0;
+ foreach (const QDeclarativeError &error, errors){
+ errstr += QLatin1String(" ") + error.toString() + QLatin1String("\n");
+ QScriptValue qmlErrObject = ctxt->engine()->newObject();
+ qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
+ qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
+ qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
+ qmlErrObject.setProperty("message", QScriptValue(error.description()));
+ arr.setProperty(i++, qmlErrObject);
+ }
+ QScriptValue err = ctxt->throwError(errstr);
+ err.setProperty("qmlErrors",arr);
+ return err;
}
Q_ASSERT(obj);
@@ -1051,7 +1097,7 @@ QScriptValue QDeclarativeEnginePrivate::isQtObject(QScriptContext *ctxt, QScript
QScriptValue QDeclarativeEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 3)
- return engine->nullValue();
+ return ctxt->throwError("Qt.vector(): Invalid arguments");
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
qsreal z = ctxt->argument(2).toNumber();
@@ -1062,7 +1108,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptE
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.formatDate(): Invalid arguments");
QDate date = ctxt->argument(0).toDateTime().date();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1072,8 +1118,9 @@ QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptE
return engine->newVariant(qVariantFromValue(date.toString(format)));
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
- } else
- return engine->nullValue();
+ } else {
+ return ctxt->throwError("Qt.formatDate(): Invalid date format");
+ }
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
}
@@ -1082,7 +1129,7 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.formatTime(): Invalid arguments");
QTime date = ctxt->argument(0).toDateTime().time();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1092,8 +1139,9 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE
return engine->newVariant(qVariantFromValue(date.toString(format)));
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
- } else
- return engine->nullValue();
+ } else {
+ return ctxt->throwError("Qt.formatTime(): Invalid time format");
+ }
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
}
@@ -1102,7 +1150,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.formatDateTime(): Invalid arguments");
QDateTime date = ctxt->argument(0).toDateTime();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1112,8 +1160,9 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
return engine->newVariant(qVariantFromValue(date.toString(format)));
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
- } else
- return engine->nullValue();
+ } else {
+ return ctxt->throwError("Qt.formatDateTime(): Invalid datetime formate");
+ }
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
}
@@ -1122,14 +1171,20 @@ QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine
{
int argCount = ctxt->argumentCount();
if(argCount < 3 || argCount > 4)
- return engine->nullValue();
+ return ctxt->throwError("Qt.rgba(): Invalid arguments");
qsreal r = ctxt->argument(0).toNumber();
qsreal g = ctxt->argument(1).toNumber();
qsreal b = ctxt->argument(2).toNumber();
qsreal a = (argCount == 4) ? ctxt->argument(3).toNumber() : 1;
- if (r < 0 || r > 1 || g < 0 || g > 1 || b < 0 || b > 1 || a < 0 || a > 1)
- return engine->nullValue();
+ if (r < 0.0) r=0.0;
+ if (r > 1.0) r=1.0;
+ if (g < 0.0) g=0.0;
+ if (g > 1.0) g=1.0;
+ if (b < 0.0) b=0.0;
+ if (b > 1.0) b=1.0;
+ if (a < 0.0) a=0.0;
+ if (a > 1.0) a=1.0;
return qScriptValueFromValue(engine, qVariantFromValue(QColor::fromRgbF(r, g, b, a)));
}
@@ -1138,14 +1193,20 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine
{
int argCount = ctxt->argumentCount();
if(argCount < 3 || argCount > 4)
- return engine->nullValue();
+ return ctxt->throwError("Qt.hsla(): Invalid arguments");
qsreal h = ctxt->argument(0).toNumber();
qsreal s = ctxt->argument(1).toNumber();
qsreal l = ctxt->argument(2).toNumber();
qsreal a = (argCount == 4) ? ctxt->argument(3).toNumber() : 1;
- if (h < 0 || h > 1 || s < 0 || s > 1 || l < 0 || l > 1 || a < 0 || a > 1)
- return engine->nullValue();
+ if (h < 0.0) h=0.0;
+ if (h > 1.0) h=1.0;
+ if (s < 0.0) s=0.0;
+ if (s > 1.0) s=1.0;
+ if (l < 0.0) l=0.0;
+ if (l > 1.0) l=1.0;
+ if (a < 0.0) a=0.0;
+ if (a > 1.0) a=1.0;
return qScriptValueFromValue(engine, qVariantFromValue(QColor::fromHslF(h, s, l, a)));
}
@@ -1153,7 +1214,7 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 4)
- return engine->nullValue();
+ return ctxt->throwError("Qt.rect(): Invalid arguments");
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
@@ -1169,7 +1230,7 @@ QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::point(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.point(): Invalid arguments");
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
return qScriptValueFromValue(engine, qVariantFromValue(QPointF(x, y)));
@@ -1178,7 +1239,7 @@ QScriptValue QDeclarativeEnginePrivate::point(QScriptContext *ctxt, QScriptEngin
QScriptValue QDeclarativeEnginePrivate::size(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.size(): Invalid arguments");
qsreal w = ctxt->argument(0).toNumber();
qsreal h = ctxt->argument(1).toNumber();
return qScriptValueFromValue(engine, qVariantFromValue(QSizeF(w, h)));
@@ -1187,7 +1248,7 @@ QScriptValue QDeclarativeEnginePrivate::size(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::lighter(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 1)
- return engine->nullValue();
+ return ctxt->throwError("Qt.lighter(): Invalid arguments");
QVariant v = ctxt->argument(0).toVariant();
QColor color;
if (v.userType() == QVariant::Color)
@@ -1206,7 +1267,7 @@ QScriptValue QDeclarativeEnginePrivate::lighter(QScriptContext *ctxt, QScriptEng
QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 1)
- return engine->nullValue();
+ return ctxt->throwError("Qt.darker(): Invalid arguments");
QVariant v = ctxt->argument(0).toVariant();
QColor color;
if (v.userType() == QVariant::Color)
@@ -1225,21 +1286,20 @@ QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngi
QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QScriptEngine *e)
{
if(ctxt->argumentCount() < 1)
- return e->newVariant(QVariant(false));
+ return QScriptValue(e, false);
bool ret = false;
#ifndef QT_NO_DESKTOPSERVICES
ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
#endif
- return e->newVariant(QVariant(ret));
+ return QScriptValue(e, ret);
}
QScriptValue QDeclarativeEnginePrivate::md5(QScriptContext *ctxt, QScriptEngine *)
{
- QByteArray data;
-
- if (ctxt->argumentCount() >= 1)
- data = ctxt->argument(0).toString().toUtf8();
+ if (ctxt->argumentCount() != 1)
+ return ctxt->throwError("Qt.md5(): Invalid arguments");
+ QByteArray data = ctxt->argument(0).toString().toUtf8();
QByteArray result = QCryptographicHash::hash(data, QCryptographicHash::Md5);
return QScriptValue(QLatin1String(result.toHex()));
@@ -1247,20 +1307,20 @@ QScriptValue QDeclarativeEnginePrivate::md5(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::btoa(QScriptContext *ctxt, QScriptEngine *)
{
- QByteArray data;
+ if (ctxt->argumentCount() != 1)
+ return ctxt->throwError("Qt.btoa(): Invalid arguments");
- if (ctxt->argumentCount() >= 1)
- data = ctxt->argument(0).toString().toUtf8();
+ QByteArray data = ctxt->argument(0).toString().toUtf8();
return QScriptValue(QLatin1String(data.toBase64()));
}
QScriptValue QDeclarativeEnginePrivate::atob(QScriptContext *ctxt, QScriptEngine *)
{
- QByteArray data;
+ if (ctxt->argumentCount() != 1)
+ return ctxt->throwError("Qt.atob(): Invalid arguments");
- if (ctxt->argumentCount() >= 1)
- data = ctxt->argument(0).toString().toUtf8();
+ QByteArray data = ctxt->argument(0).toString().toUtf8();
return QScriptValue(QLatin1String(QByteArray::fromBase64(data)));
}
@@ -1284,23 +1344,82 @@ QScriptValue QDeclarativeEnginePrivate::consoleLog(QScriptContext *ctxt, QScript
return e->newVariant(QVariant(true));
}
-void QDeclarativeEnginePrivate::sendQuit ()
+void QDeclarativeEnginePrivate::sendQuit()
{
Q_Q(QDeclarativeEngine);
emit q->quit();
}
+static void dumpwarning(const QDeclarativeError &error)
+{
+ qWarning().nospace() << qPrintable(error.toString());
+}
+
+static void dumpwarning(const QList<QDeclarativeError> &errors)
+{
+ for (int ii = 0; ii < errors.count(); ++ii)
+ dumpwarning(errors.at(ii));
+}
+
+void QDeclarativeEnginePrivate::warning(const QDeclarativeError &error)
+{
+ Q_Q(QDeclarativeEngine);
+ q->warnings(QList<QDeclarativeError>() << error);
+ if (outputWarningsToStdErr)
+ dumpwarning(error);
+}
+
+void QDeclarativeEnginePrivate::warning(const QList<QDeclarativeError> &errors)
+{
+ Q_Q(QDeclarativeEngine);
+ q->warnings(errors);
+ if (outputWarningsToStdErr)
+ dumpwarning(errors);
+}
+
+void QDeclarativeEnginePrivate::warning(QDeclarativeEngine *engine, const QDeclarativeError &error)
+{
+ if (engine)
+ QDeclarativeEnginePrivate::get(engine)->warning(error);
+ else
+ dumpwarning(error);
+}
+
+void QDeclarativeEnginePrivate::warning(QDeclarativeEngine *engine, const QList<QDeclarativeError> &error)
+{
+ if (engine)
+ QDeclarativeEnginePrivate::get(engine)->warning(error);
+ else
+ dumpwarning(error);
+}
+
+void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const QDeclarativeError &error)
+{
+ if (engine)
+ engine->warning(error);
+ else
+ dumpwarning(error);
+}
+
+void QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate *engine, const QList<QDeclarativeError> &error)
+{
+ if (engine)
+ engine->warning(error);
+ else
+ dumpwarning(error);
+}
+
QScriptValue QDeclarativeEnginePrivate::quit(QScriptContext * /*ctxt*/, QScriptEngine *e)
{
QDeclarativeEnginePrivate *qe = get (e);
- qe->sendQuit ();
+ qe->sendQuit();
return QScriptValue();
}
QScriptValue QDeclarativeEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return engine->nullValue();
+ return ctxt->throwError("Qt.tint(): Invalid arguments");
//get color
QVariant v = ctxt->argument(0).toVariant();
QColor color;
@@ -1350,7 +1469,7 @@ QScriptValue QDeclarativeEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::scriptValueFromVariant(const QVariant &val)
{
if (val.userType() == qMetaTypeId<QDeclarativeListReference>()) {
- QDeclarativeListReferencePrivate *p =
+ QDeclarativeListReferencePrivate *p =
QDeclarativeListReferencePrivate::get((QDeclarativeListReference*)val.constData());
if (p->object) {
return listClass->newList(p->property, p->propertyType);
@@ -1383,7 +1502,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
QScriptDeclarativeClass *dc = QScriptDeclarativeClass::scriptClass(val);
if (dc == objectClass)
return QVariant::fromValue(objectClass->toQObject(val));
- else if (dc == valueTypeClass)
+ else if (dc == valueTypeClass)
return valueTypeClass->toVariant(val);
else if (dc == contextClass)
return QVariant();
@@ -1410,7 +1529,6 @@ static QString toLocalFileOrQrc(const QUrl& url)
if (url.scheme() == QLatin1String("qrc")) {
if (url.authority().isEmpty())
return QLatin1Char(':') + url.path();
- qWarning() << "Invalid url:" << url.toString() << "authority" << url.authority() << "not known.";
return QString();
}
return url.toLocalFile();
@@ -1595,7 +1713,7 @@ public:
if (importType == QDeclarativeScriptParser::Import::Library) {
url.replace(QLatin1Char('.'), QLatin1Char('/'));
bool found = false;
- QString dir;
+ QString dir;
foreach (const QString &p,
@@ -1620,7 +1738,7 @@ public:
found = QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin);
if (!found) {
if (errorString) {
- bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), 0, 0);
+ bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
if (anyversion)
*errorString = QDeclarativeEngine::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
else
@@ -1773,8 +1891,8 @@ static QDeclarativeTypeNameCache *cacheForNamespace(QDeclarativeEngine *engine,
int minor = set.minversions.at(ii);
foreach (QDeclarativeType *type, types) {
- if (type->qmlTypeName().startsWith(base) &&
- type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
+ if (type->qmlTypeName().startsWith(base) &&
+ type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
type->availableInVersion(major,minor))
{
QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length()));
@@ -1943,7 +2061,8 @@ QStringList QDeclarativeEngine::pluginPathList() const
/*!
Sets the list of directories where the engine searches for
- native plugins for imported modules (referenced in the \c qmldir file).
+ native plugins for imported modules (referenced in the \c qmldir file)
+ to \a paths.
By default, the list contains only \c ., i.e. the engine searches
in the directory of the \c qmldir file itself.
@@ -1961,6 +2080,8 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths)
Imports the plugin named \a filePath with the \a uri provided.
Returns true if the plugin was successfully imported; otherwise returns false.
+ On failure and if non-null, *\a errorString will be set to a message describing the failure.
+
The plugin has to be a Qt plugin which implements the QDeclarativeExtensionPlugin interface.
*/
bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 7b058ea..e161cd9 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -46,6 +46,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qmap.h>
#include <QtScript/qscriptvalue.h>
+#include <QtDeclarative/qdeclarativeerror.h>
QT_BEGIN_HEADER
@@ -102,6 +103,9 @@ public:
QUrl baseUrl() const;
void setBaseUrl(const QUrl &);
+ bool outputWarningsToStandardError() const;
+ void setOutputWarningsToStandardError(bool);
+
static QDeclarativeContext *contextForObject(const QObject *);
static void setContextForObject(QObject *, QDeclarativeContext *);
@@ -110,7 +114,8 @@ public:
static ObjectOwnership objectOwnership(QObject *);
Q_SIGNALS:
- void quit ();
+ void quit();
+ void warnings(const QList<QDeclarativeError> &warnings);
private:
Q_DECLARE_PRIVATE(QDeclarativeEngine)
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index b3bba43..f6b9bcb 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -162,6 +162,8 @@ public:
QDeclarativeExpression *currentExpression;
bool isDebugging;
+ bool outputWarningsToStdErr;
+
struct ImportedNamespace;
QDeclarativeContextScriptClass *contextClass;
QDeclarativeContextData *sharedContext;
@@ -311,7 +313,13 @@ public:
QScriptValue scriptValueFromVariant(const QVariant &);
QVariant scriptValueToVariant(const QScriptValue &, int hint = QVariant::Invalid);
- void sendQuit ();
+ void sendQuit();
+ void warning(const QDeclarativeError &);
+ void warning(const QList<QDeclarativeError> &);
+ static void warning(QDeclarativeEngine *, const QDeclarativeError &);
+ static void warning(QDeclarativeEngine *, const QList<QDeclarativeError> &);
+ static void warning(QDeclarativeEnginePrivate *, const QDeclarativeError &);
+ static void warning(QDeclarativeEnginePrivate *, const QList<QDeclarativeError> &);
static QScriptValue qmlScriptObject(QObject*, QDeclarativeEngine*);
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index 578733c..264fd8d 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -308,8 +308,6 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message)
QByteArray type;
ds >> type;
- //qDebug() << "QDeclarativeEngineDebugServer::messageReceived()" << type;
-
if (type == "LIST_ENGINES") {
int queryId;
ds >> queryId;
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
index 7e8aac0..8717f56 100644
--- a/src/declarative/qml/qdeclarativeerror.cpp
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -49,8 +49,27 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeError
- \since 4.7
- \brief The QDeclarativeError class encapsulates a QML error
+ \since 4.7
+ \brief The QDeclarativeError class encapsulates a QML error.
+
+ QDeclarativeError includes a textual description of the error, as well
+ as location information (the file, line, and column). The toString()
+ method creates a single-line, human-readable string containing all of
+ this information, for example:
+ \code
+ file:///home/user/test.qml:7:8: Invalid property assignment: double expected
+ \endcode
+
+ You can use qDebug() or qWarning() to output errors to the console. This method
+ will attempt to open the file indicated by the error
+ and include additional contextual information.
+ \code
+ file:///home/user/test.qml:7:8: Invalid property assignment: double expected
+ y: "hello"
+ ^
+ \endcode
+
+ \sa QDeclarativeView::errors(), QDeclarativeComponent::errors()
*/
class QDeclarativeErrorPrivate
{
@@ -69,7 +88,7 @@ QDeclarativeErrorPrivate::QDeclarativeErrorPrivate()
}
/*!
- Create an empty error object.
+ Creates an empty error object.
*/
QDeclarativeError::QDeclarativeError()
: d(0)
@@ -77,7 +96,7 @@ QDeclarativeError::QDeclarativeError()
}
/*!
- Create a copy of \a other.
+ Creates a copy of \a other.
*/
QDeclarativeError::QDeclarativeError(const QDeclarativeError &other)
: d(0)
@@ -86,7 +105,7 @@ QDeclarativeError::QDeclarativeError(const QDeclarativeError &other)
}
/*!
- Assign \a other to this error object.
+ Assigns \a other to this error object.
*/
QDeclarativeError &QDeclarativeError::operator=(const QDeclarativeError &other)
{
@@ -112,7 +131,7 @@ QDeclarativeError::~QDeclarativeError()
}
/*!
- Return true if this error is valid, otherwise false.
+ Returns true if this error is valid, otherwise false.
*/
bool QDeclarativeError::isValid() const
{
@@ -120,7 +139,7 @@ bool QDeclarativeError::isValid() const
}
/*!
- Return the url for the file that caused this error.
+ Returns the url for the file that caused this error.
*/
QUrl QDeclarativeError::url() const
{
@@ -129,7 +148,7 @@ QUrl QDeclarativeError::url() const
}
/*!
- Set the \a url for the file that caused this error.
+ Sets the \a url for the file that caused this error.
*/
void QDeclarativeError::setUrl(const QUrl &url)
{
@@ -138,7 +157,7 @@ void QDeclarativeError::setUrl(const QUrl &url)
}
/*!
- Return the error description.
+ Returns the error description.
*/
QString QDeclarativeError::description() const
{
@@ -147,7 +166,7 @@ QString QDeclarativeError::description() const
}
/*!
- Set the error \a description.
+ Sets the error \a description.
*/
void QDeclarativeError::setDescription(const QString &description)
{
@@ -156,7 +175,7 @@ void QDeclarativeError::setDescription(const QString &description)
}
/*!
- Return the error line number.
+ Returns the error line number.
*/
int QDeclarativeError::line() const
{
@@ -165,7 +184,7 @@ int QDeclarativeError::line() const
}
/*!
- Set the error \a line number.
+ Sets the error \a line number.
*/
void QDeclarativeError::setLine(int line)
{
@@ -174,7 +193,7 @@ void QDeclarativeError::setLine(int line)
}
/*!
- Return the error column number.
+ Returns the error column number.
*/
int QDeclarativeError::column() const
{
@@ -183,7 +202,7 @@ int QDeclarativeError::column() const
}
/*!
- Set the error \a column number.
+ Sets the error \a column number.
*/
void QDeclarativeError::setColumn(int column)
{
@@ -192,14 +211,20 @@ void QDeclarativeError::setColumn(int column)
}
/*!
- Return the error as a human readable string.
+ Returns the error as a human readable string.
*/
QString QDeclarativeError::toString() const
{
QString rv;
- rv = url().toString() + QLatin1Char(':') + QString::number(line());
- if(column() != -1)
- rv += QLatin1Char(':') + QString::number(column());
+ if (url().isEmpty()) {
+ rv = QLatin1String("<Unknown File>");
+ } else if (line() != -1) {
+ rv = url().toString() + QLatin1Char(':') + QString::number(line());
+ if(column() != -1)
+ rv += QLatin1Char(':') + QString::number(column());
+ } else {
+ rv = url().toString();
+ }
rv += QLatin1String(": ") + description();
@@ -210,7 +235,7 @@ QString QDeclarativeError::toString() const
\relates QDeclarativeError
\fn QDebug operator<<(QDebug debug, const QDeclarativeError &error)
- Output a human readable version of \a error to \a debug.
+ Outputs a human readable version of \a error to \a debug.
*/
QDebug operator<<(QDebug debug, const QDeclarativeError &error)
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index 05240a2..8b5a62f 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -695,14 +695,13 @@ void QDeclarativeExpressionPrivate::updateGuards(const QPODVector<QDeclarativeEn
if (!outputWarningHeader) {
outputWarningHeader = true;
qWarning() << "QDeclarativeExpression: Expression" << q->expression()
- << "depends on non-NOTIFYable properties:";
+ << "depends on non-NOTIFYable properties:";
}
const QMetaObject *metaObj = property.object->metaObject();
QMetaProperty metaProp = metaObj->property(property.coreIndex);
- qWarning().nospace() << " " << metaObj->className()
- << "::" << metaProp.name();
+ qWarning().nospace() << " " << metaObj->className() << "::" << metaProp.name();
}
}
}
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 762c642d..863bfc4 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -59,6 +59,11 @@ QT_BEGIN_NAMESPACE
function, and exporting the class using the Q_EXPORT_PLUGIN2()
macro.
+ QML extension plugins can be used to provide either application-specific or
+ library-like plugins. Library plugins should limit themselves to registering types,
+ as any manipulation of the engine's root context may cause conflicts
+ or other issues in the library user's code.
+
See \l {Extending QML in C++} for details how to write a QML extension plugin.
See \l {How to Create Qt Plugins} for general Qt plugin documentation.
@@ -85,7 +90,7 @@ QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent)
}
/*!
- Destructor.
+ Destroys the plugin.
*/
QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
{
@@ -94,7 +99,9 @@ QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
/*!
\fn void QDeclarativeExtensionPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
- Initializes the extension from the \a uri using the \a engine.
+ Initializes the extension from the \a uri using the \a engine. Here an application
+ plugin might, for example, expose some data or objects to QML,
+ as context properties on the engine's root context.
*/
void QDeclarativeExtensionPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index b992b9f..4be3472 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -45,31 +45,39 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeImageProvider
- \brief The QDeclarativeImageProvider class provides an interface for threaded image requests.
+ \since 4.7
+ \brief The QDeclarativeImageProvider class provides an interface for threaded image requests in QML.
- Note: the request() method may be called by multiple threads, so ensure the
+ QDeclarativeImageProvider can be used by a QDeclarativeEngine to provide images to QML asynchronously.
+ The image request will be run in a low priority thread, allowing potentially costly image
+ loading to be done in the background, without affecting the performance of the UI.
+
+ See the QDeclarativeEngine::addImageProvider() documentation for an
+ example of how a custom QDeclarativeImageProvider can be constructed and used.
+
+ \note the request() method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
\sa QDeclarativeEngine::addImageProvider()
*/
/*!
- The destructor is virtual.
+ Destroys the image provider.
*/
QDeclarativeImageProvider::~QDeclarativeImageProvider()
{
}
/*!
- \fn QImage QDeclarativeImageProvider::request(const QString &id, QSize *size, const QSize& requested_size)
+ \fn QImage QDeclarativeImageProvider::request(const QString &id, QSize *size, const QSize& requestedSize)
Implement this method to return the image with \a id.
- If \a requested_size is a valid size, resize the image to that size before returning.
+ If \a requestedSize is a valid size, the image returned should be of that size.
- In any case, \a size must be set to the (original) size of the image.
+ In all cases, \a size must be set to the original size of the image.
- Note: this method may be called by multiple threads, so ensure the
+ \note this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
*/
diff --git a/src/declarative/qml/qdeclarativeimageprovider.h b/src/declarative/qml/qdeclarativeimageprovider.h
index 50b73fe..cc9c9af 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.h
+++ b/src/declarative/qml/qdeclarativeimageprovider.h
@@ -54,7 +54,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeImageProvider
{
public:
virtual ~QDeclarativeImageProvider();
- virtual QImage request(const QString &id, QSize *size, const QSize& requested_size) = 0;
+ virtual QImage request(const QString &id, QSize *size, const QSize& requestedSize) = 0;
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
index 0a4352f..ffed14e 100644
--- a/src/declarative/qml/qdeclarativeinfo.cpp
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -45,6 +45,7 @@
#include "qdeclarativecontext.h"
#include "private/qdeclarativecontext_p.h"
#include "private/qdeclarativemetatype_p.h"
+#include "private/qdeclarativeengine_p.h"
#include <QCoreApplication>
@@ -77,51 +78,98 @@ QT_BEGIN_NAMESPACE
\endcode
*/
-QDeclarativeInfo::QDeclarativeInfo(const QObject *object)
-: QDebug(QtWarningMsg)
+struct QDeclarativeInfoPrivate
{
- QString pos = QLatin1String("QML");
- if (object) {
- pos += QLatin1Char(' ');
-
- QString typeName;
- QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject());
- if (type) {
- typeName = QLatin1String(type->qmlTypeName());
- int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
- if (lastSlash != -1)
- typeName = typeName.mid(lastSlash+1);
- } else {
- typeName = QString::fromUtf8(object->metaObject()->className());
- int marker = typeName.indexOf(QLatin1String("_QMLTYPE_"));
- if (marker != -1)
- typeName = typeName.left(marker);
- }
+ QDeclarativeInfoPrivate() : ref (1), object(0) {}
- pos += typeName;
- }
- QDeclarativeData *ddata = object?QDeclarativeData::get(object):0;
- pos += QLatin1String(" (");
- if (ddata) {
- if (ddata->outerContext && !ddata->outerContext->url.isEmpty()) {
- pos += ddata->outerContext->url.toString();
- pos += QLatin1Char(':');
- pos += QString::number(ddata->lineNumber);
- pos += QLatin1Char(':');
- pos += QString::number(ddata->columnNumber);
- } else {
- pos += QCoreApplication::translate("QDeclarativeInfo","unknown location");
- }
- } else {
- pos += QCoreApplication::translate("QDeclarativeInfo","unknown location");
- }
- pos += QLatin1Char(')');
- *this << pos;
+ int ref;
+ const QObject *object;
+ QString buffer;
+ QList<QDeclarativeError> errors;
+};
+
+QDeclarativeInfo::QDeclarativeInfo(QDeclarativeInfoPrivate *p)
+: QDebug(&p->buffer), d(p)
+{
nospace();
}
+QDeclarativeInfo::QDeclarativeInfo(const QDeclarativeInfo &other)
+: QDebug(other), d(other.d)
+{
+ d->ref++;
+}
+
QDeclarativeInfo::~QDeclarativeInfo()
{
+ if (0 == --d->ref) {
+ QList<QDeclarativeError> errors = d->errors;
+
+ QDeclarativeEngine *engine = 0;
+
+ if (!d->buffer.isEmpty()) {
+ QDeclarativeError error;
+
+ QObject *object = const_cast<QObject *>(d->object);
+
+ if (object) {
+ engine = qmlEngine(d->object);
+ QString typeName;
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject());
+ if (type) {
+ typeName = QLatin1String(type->qmlTypeName());
+ int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
+ if (lastSlash != -1)
+ typeName = typeName.mid(lastSlash+1);
+ } else {
+ typeName = QString::fromUtf8(object->metaObject()->className());
+ int marker = typeName.indexOf(QLatin1String("_QMLTYPE_"));
+ if (marker != -1)
+ typeName = typeName.left(marker);
+ }
+
+ d->buffer.prepend(QLatin1String("QML ") + typeName + QLatin1String(": "));
+
+ QDeclarativeData *ddata = QDeclarativeData::get(object, false);
+ if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) {
+ error.setUrl(ddata->outerContext->url);
+ error.setLine(ddata->lineNumber);
+ error.setColumn(ddata->columnNumber);
+ }
+ }
+
+ error.setDescription(d->buffer);
+
+ errors.prepend(error);
+ }
+
+ QDeclarativeEnginePrivate::warning(engine, errors);
+
+ delete d;
+ }
+}
+
+QDeclarativeInfo qmlInfo(const QObject *me)
+{
+ QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate;
+ d->object = me;
+ return QDeclarativeInfo(d);
+}
+
+QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error)
+{
+ QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate;
+ d->object = me;
+ d->errors << error;
+ return QDeclarativeInfo(d);
+}
+
+QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors)
+{
+ QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate;
+ d->object = me;
+ d->errors = errors;
+ return QDeclarativeInfo(d);
}
diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h
index 8f69f73..2ac28f4 100644
--- a/src/declarative/qml/qdeclarativeinfo.h
+++ b/src/declarative/qml/qdeclarativeinfo.h
@@ -43,6 +43,8 @@
#define QDECLARATIVEINFO_H
#include <QtCore/qdebug.h>
+#include <QtCore/qurl.h>
+#include <QtDeclarative/qdeclarativeerror.h>
QT_BEGIN_HEADER
@@ -50,10 +52,11 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
+class QDeclarativeInfoPrivate;
class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug
{
public:
- QDeclarativeInfo(const QObject *);
+ QDeclarativeInfo(const QDeclarativeInfo &);
~QDeclarativeInfo();
inline QDeclarativeInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; }
@@ -78,12 +81,20 @@ public:
inline QDeclarativeInfo &operator<<(const void * t) { QDebug::operator<<(t); return *this; }
inline QDeclarativeInfo &operator<<(QTextStreamFunction f) { QDebug::operator<<(f); return *this; }
inline QDeclarativeInfo &operator<<(QTextStreamManipulator m) { QDebug::operator<<(m); return *this; }
+ inline QDeclarativeInfo &operator<<(const QUrl &t) { static_cast<QDebug &>(*this) << t; return *this; }
+
+private:
+ friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me);
+ friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error);
+ friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors);
+
+ QDeclarativeInfo(QDeclarativeInfoPrivate *);
+ QDeclarativeInfoPrivate *d;
};
-Q_DECLARATIVE_EXPORT inline QDeclarativeInfo qmlInfo(const QObject *me)
-{
- return QDeclarativeInfo(me);
-}
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me);
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error);
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors);
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp
index d88d06a..99f1cc8 100644
--- a/src/declarative/qml/qdeclarativeinstruction.cpp
+++ b/src/declarative/qml/qdeclarativeinstruction.cpp
@@ -149,9 +149,6 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
case QDeclarativeInstruction::StoreSignal:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value << "\t\t" << primitives.at(instr->storeSignal.value);
break;
- case QDeclarativeInstruction::StoreScript:
- qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SCRIPT\t\t" << instr->storeScript.value;
- break;
case QDeclarativeInstruction::StoreImportedScript:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_IMPORTED_SCRIPT\t" << instr->storeScript.value;
break;
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
index e8287c0..c09b157 100644
--- a/src/declarative/qml/qdeclarativeinstruction_p.h
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -121,7 +121,6 @@ public:
StoreInterface, /* storeObject */
StoreSignal, /* storeSignal */
- StoreScript, /* storeScript */
StoreImportedScript, /* storeScript */
StoreScriptString, /* storeScriptString */
diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp
index 45b8cd7..31ef4c2 100644
--- a/src/declarative/qml/qdeclarativelist.cpp
+++ b/src/declarative/qml/qdeclarativelist.cpp
@@ -87,9 +87,10 @@ void QDeclarativeListReferencePrivate::release()
/*!
\class QDeclarativeListReference
+\since 4.7
\brief The QDeclarativeListReference class allows the manipulation of QDeclarativeListProperty properties.
-QDeclarativeListReference allows programs to read from, and assign values to a QML list property in a
+QDeclarativeListReference allows C++ programs to read from, and assign values to a QML list property in a
simple and type safe way. A QDeclarativeListReference can be created by passing an object and property
name or through a QDeclarativeProperty instance. These two are equivalant:
@@ -304,6 +305,7 @@ int QDeclarativeListReference::count() const
/*!
\class QDeclarativeListProperty
+\since 4.7
\brief The QDeclarativeListProperty class allows applications to explose list-like
properties to QML.
@@ -313,10 +315,10 @@ The use of a list property from QML looks like this:
\code
FruitBasket {
fruit: [
- Apple {},
- Orange{},
- Banana {}
- ]
+ Apple {},
+ Orange{},
+ Banana{}
+ ]
}
\endcode
@@ -336,6 +338,9 @@ Q_PROPERTY(QDeclarativeListProperty<Fruit> fruit READ fruit);
QML list properties are typesafe - in this case \c {Fruit} is a QObject type that
\c {Apple}, \c {Orange} and \c {Banana} all derive from.
+
+\note QDeclarativeListProperty can only be used for lists of QObject-derived object pointers.
+
*/
/*!
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 7b71608..d9ea8dc 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -99,8 +99,12 @@ struct QDeclarativeMetaTypeData
StringConverters stringConverters;
struct ModuleInfo {
- ModuleInfo(int maj, int min) : vmajor(maj), vminor(min) {}
- int vmajor, vminor;
+ ModuleInfo(int major, int minor)
+ : vmajor_min(major), vminor_min(minor), vmajor_max(major), vminor_max(minor) {}
+ ModuleInfo(int major_min, int minor_min, int major_max, int minor_max)
+ : vmajor_min(major_min), vminor_min(minor_min), vmajor_max(major_max), vminor_max(minor_max) {}
+ int vmajor_min, vminor_min;
+ int vmajor_max, vminor_max;
};
typedef QHash<QByteArray, ModuleInfo> ModuleInfoHash;
ModuleInfoHash modules;
@@ -134,6 +138,7 @@ public:
int m_allocationSize;
void (*m_newFunc)(void *);
+ QString m_noCreationReason;
const QMetaObject *m_baseMetaObject;
QDeclarativeAttachedPropertiesFunc m_attachedPropertiesFunc;
@@ -186,6 +191,7 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe
d->m_listId = type.listId;
d->m_allocationSize = type.objectSize;
d->m_newFunc = type.create;
+ d->m_noCreationReason = type.noCreationReason;
d->m_baseMetaObject = type.metaObject;
d->m_attachedPropertiesFunc = type.attachedPropertiesFunction;
d->m_attachedPropertiesType = type.attachedPropertiesMetaObject;
@@ -221,6 +227,76 @@ bool QDeclarativeType::availableInVersion(int vmajor, int vminor) const
return vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min);
}
+static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo,
+ const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd)
+{
+ // Clone Q_CLASSINFO
+ for (int ii = mo->classInfoOffset(); ii < mo->classInfoCount(); ++ii) {
+ QMetaClassInfo info = mo->classInfo(ii);
+
+ int otherIndex = ignoreEnd->indexOfClassInfo(info.name());
+ if (otherIndex >= ignoreStart->classInfoOffset() + ignoreStart->classInfoCount()) {
+ // Skip
+ } else {
+ builder.addClassInfo(info.name(), info.value());
+ }
+ }
+
+ // Clone Q_PROPERTY
+ for (int ii = mo->propertyOffset(); ii < mo->propertyCount(); ++ii) {
+ QMetaProperty property = mo->property(ii);
+
+ int otherIndex = ignoreEnd->indexOfProperty(property.name());
+ if (otherIndex >= ignoreStart->classInfoOffset() + ignoreStart->classInfoCount()) {
+ builder.addProperty(QByteArray("__qml_ignore__") + property.name(), QByteArray("void"));
+ // Skip
+ } else {
+ builder.addProperty(property);
+ }
+ }
+
+ // Clone Q_METHODS
+ for (int ii = mo->methodOffset(); ii < mo->methodCount(); ++ii) {
+ QMetaMethod method = mo->method(ii);
+
+ // More complex - need to search name
+ QByteArray name = method.signature();
+ int parenIdx = name.indexOf('(');
+ if (parenIdx != -1) name = name.left(parenIdx);
+
+
+ bool found = false;
+
+ for (int ii = ignoreStart->methodOffset() + ignoreStart->methodCount();
+ !found && ii < ignoreEnd->methodOffset() + ignoreEnd->methodCount();
+ ++ii) {
+
+ QMetaMethod other = ignoreEnd->method(ii);
+ QByteArray othername = other.signature();
+ int parenIdx = othername.indexOf('(');
+ if (parenIdx != -1) othername = othername.left(parenIdx);
+
+ found = name == othername;
+ }
+
+ QMetaMethodBuilder m = builder.addMethod(method);
+ if (found) // SKIP
+ m.setAccess(QMetaMethod::Private);
+ }
+
+ // Clone Q_ENUMS
+ for (int ii = mo->enumeratorOffset(); ii < mo->enumeratorCount(); ++ii) {
+ QMetaEnum enumerator = mo->enumerator(ii);
+
+ int otherIndex = ignoreEnd->indexOfEnumerator(enumerator.name());
+ if (otherIndex >= ignoreStart->enumeratorOffset() + ignoreStart->enumeratorCount()) {
+ // Skip
+ } else {
+ builder.addEnumerator(enumerator);
+ }
+ }
+}
+
void QDeclarativeTypePrivate::init() const
{
if (m_isSetup) return;
@@ -245,8 +321,9 @@ void QDeclarativeTypePrivate::init() const
QDeclarativeType *t = metaTypeData()->metaObjectToType.value(mo);
if (t) {
if (t->d->m_extFunc) {
- QMetaObject *mmo = new QMetaObject;
- *mmo = *t->d->m_extMetaObject;
+ QMetaObjectBuilder builder;
+ clone(builder, t->d->m_extMetaObject, t->d->m_baseMetaObject, m_baseMetaObject);
+ QMetaObject *mmo = builder.toMetaObject();
mmo->d.superdata = m_baseMetaObject;
if (!m_metaObjects.isEmpty())
m_metaObjects.last().metaObject->d.superdata = mmo;
@@ -318,6 +395,11 @@ QDeclarativeType::CreateFunc QDeclarativeType::createFunction() const
return d->m_newFunc;
}
+QString QDeclarativeType::noCreationReason() const
+{
+ return d->m_noCreationReason;
+}
+
int QDeclarativeType::createSize() const
{
return d->m_allocationSize;
@@ -403,10 +485,8 @@ int QDeclarativeType::index() const
int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface)
{
- if (interface.version > 0) {
- qWarning("Cannot mix incompatible QML versions.");
- return -1;
- }
+ if (interface.version > 0)
+ qFatal("qmlRegisterType(): Cannot mix incompatible QML versions.");
QWriteLocker lock(metaTypeDataLock());
QDeclarativeMetaTypeData *data = metaTypeData();
@@ -437,7 +517,7 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &t
if (type.elementName) {
for (int ii = 0; type.elementName[ii]; ++ii) {
if (!isalnum(type.elementName[ii])) {
- qWarning("QDeclarativeMetaType: Invalid QML element name %s", type.elementName);
+ qWarning("qmlRegisterType(): Invalid QML element name \"%s\"", type.elementName);
return -1;
}
}
@@ -468,9 +548,15 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &t
if (type.uri) {
QByteArray mod(type.uri);
QDeclarativeMetaTypeData::ModuleInfoHash::Iterator it = data->modules.find(mod);
- if (it == data->modules.end()
- || ((*it).vmajor < type.versionMajor || ((*it).vmajor == type.versionMajor && (*it).vminor < type.versionMinor))) {
+ if (it == data->modules.end()) {
+ // New module
data->modules.insert(mod, QDeclarativeMetaTypeData::ModuleInfo(type.versionMajor,type.versionMinor));
+ } else if ((*it).vmajor_max < type.versionMajor || ((*it).vmajor_max == type.versionMajor && (*it).vminor_max < type.versionMinor)) {
+ // Newer module
+ data->modules.insert(mod, QDeclarativeMetaTypeData::ModuleInfo((*it).vmajor_min, (*it).vminor_min, type.versionMajor, type.versionMinor));
+ } else if ((*it).vmajor_min > type.versionMajor || ((*it).vmajor_min == type.versionMajor && (*it).vminor_min > type.versionMinor)) {
+ // Older module
+ data->modules.insert(mod, QDeclarativeMetaTypeData::ModuleInfo(type.versionMajor, type.versionMinor, (*it).vmajor_min, (*it).vminor_min));
}
}
@@ -478,15 +564,23 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &t
}
/*
- Have any types been registered for \a module with at least versionMajor.versionMinor.
+ Have any types been registered for \a module with at least versionMajor.versionMinor, and types
+ for \a module with at most versionMajor.versionMinor.
+
+ So if only 4.7 and 4.9 have been registered, 4.7,4.8, and 4.9 are valid, but not 4.6 nor 4.10.
+
+ Passing -1 for both \a versionMajor \a versionMinor will return true if any version is installed.
*/
bool QDeclarativeMetaType::isModule(const QByteArray &module, int versionMajor, int versionMinor)
{
QDeclarativeMetaTypeData *data = metaTypeData();
QDeclarativeMetaTypeData::ModuleInfoHash::Iterator it = data->modules.find(module);
return it != data->modules.end()
- && ((*it).vmajor > versionMajor ||
- ((*it).vmajor == versionMajor && (*it).vminor >= versionMinor));
+ && ((versionMajor<0 && versionMinor<0) ||
+ (((*it).vmajor_max > versionMajor ||
+ ((*it).vmajor_max == versionMajor && (*it).vminor_max >= versionMinor))
+ && ((*it).vmajor_min < versionMajor ||
+ ((*it).vmajor_min == versionMajor && (*it).vminor_min <= versionMinor))));
}
QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok)
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index 70b7c90..bf6a700 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -123,6 +123,7 @@ public:
bool isCreatable() const;
bool isExtendedType() const;
+ QString noCreationReason() const;
bool isInterface() const;
int typeId() const;
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
index 9dd7d39..b116129 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
@@ -45,8 +45,8 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeNetworkAccessManagerFactory
- \since 4.7
- \brief The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager
+ \since 4.7
+ \brief The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager for use by a Qt Declarative engine.
QNetworkAccessManager is used for all network access by QML.
By implementing a factory it is possible to create custom
@@ -56,12 +56,17 @@ QT_BEGIN_NAMESPACE
To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and implement
the create() method.
+ To use a factory, assign it to the relevant QDeclarativeEngine using
+ QDeclarativeEngine::setNetworkAccessManagerFactory().
+
If the created QNetworkAccessManager becomes invalid, due to a
change in proxy settings, for example, call the invalidate() method.
This will cause all QNetworkAccessManagers to be recreated.
Note: the create() method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
+
+ \sa QDeclarativeEngine::setNetworkAccessManagerFactory()
*/
/*!
@@ -77,6 +82,8 @@ QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactor
Implement this method to create a QNetworkAccessManager with \a parent.
This allows proxies, caching and cookie support to be setup appropriately.
+ This method should return a new QNetworkAccessManager each time it is called.
+
Note: this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
*/
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index 5773fe6..bb5c8b7 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -59,12 +59,17 @@ Q_DECLARE_METATYPE(QScriptValue);
QT_BEGIN_NAMESPACE
struct ObjectData : public QScriptDeclarativeClass::Object {
- ObjectData(QObject *o, int t) : object(o), type(t) {}
+ ObjectData(QObject *o, int t) : object(o), type(t) {
+ if (o) {
+ QDeclarativeData *ddata = QDeclarativeData::get(object, true);
+ if (ddata) ddata->objectDataRefCount++;
+ }
+ }
virtual ~ObjectData() {
if (object && !object->parent()) {
QDeclarativeData *ddata = QDeclarativeData::get(object, false);
- if (ddata && !ddata->indestructible)
+ if (ddata && !ddata->indestructible && 0 == --ddata->objectDataRefCount)
object->deleteLater();
}
}
@@ -348,7 +353,13 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
if (delBinding)
delBinding->destroy();
- if (value.isUndefined() && lastData->flags & QDeclarativePropertyCache::Data::IsResettable) {
+ if (value.isNull() && lastData->flags & QDeclarativePropertyCache::Data::IsQObjectDerived) {
+ QObject *o = 0;
+ int status = -1;
+ int flags = 0;
+ void *argv[] = { &o, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, lastData->coreIndex, argv);
+ } else if (value.isUndefined() && lastData->flags & QDeclarativePropertyCache::Data::IsResettable) {
void *a[] = { 0 };
QMetaObject::metacall(obj, QMetaObject::ResetProperty, lastData->coreIndex, a);
} else if (value.isUndefined() && lastData->propType == qMetaTypeId<QVariant>()) {
@@ -458,12 +469,21 @@ QStringList QDeclarativeObjectScriptClass::propertyNames(Object *object)
cache = ddata->propertyCache;
if (!cache) {
cache = enginePrivate->cache(obj);
- if (cache && ddata) { cache->addref(); ddata->propertyCache = cache; }
+ if (cache) {
+ if (ddata) { cache->addref(); ddata->propertyCache = cache; }
+ } else {
+ // Not cachable - fall back to QMetaObject (eg. dynamic meta object)
+ // XXX QDeclarativeOpenMetaObject has a cache, so this is suboptimal.
+ // XXX This is a workaround for QTBUG-9420.
+ const QMetaObject *mo = obj->metaObject();
+ QStringList r;
+ int pc = mo->propertyCount();
+ int po = mo->propertyOffset();
+ for (int i=po; i<pc; ++i)
+ r += QString::fromUtf8(mo->property(i).name());
+ return r;
+ }
}
-
- if (!cache)
- return QStringList();
-
return cache->propertyNames();
}
diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
index d1f209a..b38bd76 100644
--- a/src/declarative/qml/qdeclarativeparser.cpp
+++ b/src/declarative/qml/qdeclarativeparser.cpp
@@ -89,8 +89,6 @@ QDeclarativeParser::Object::~Object()
prop.first->release();
foreach(const DynamicProperty &prop, dynamicProperties)
if (prop.defaultValue) prop.defaultValue->release();
- foreach(Object *obj, scriptBlockObjects)
- obj->release();
}
void Object::setBindingBit(int b)
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index 00fc65b..0870cfb 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -160,8 +160,6 @@ namespace QDeclarativeParser
Property *defaultProperty;
QHash<QByteArray, Property *> properties;
- QList<Object *> scriptBlockObjects;
-
// Output of the compilation phase (these properties continue to exist
// in either the defaultProperty or properties members too)
void addValueProperty(Property *);
@@ -190,7 +188,9 @@ namespace QDeclarativeParser
QList<int> lineNumbers;
QList<Pragmas> pragmas;
};
+#if 0
QList<ScriptBlock> scripts;
+#endif
// The bytes to cast instances by to get to the QDeclarativeParserStatus
// interface. -1 indicates the type doesn't support this interface.
diff --git a/src/declarative/qml/qdeclarativeparserstatus.cpp b/src/declarative/qml/qdeclarativeparserstatus.cpp
index ec6260e..978bfb4 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.cpp
+++ b/src/declarative/qml/qdeclarativeparserstatus.cpp
@@ -45,8 +45,36 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeParserStatus
- \since 4.7
- \brief The QDeclarativeParserStatus class provides updates on the parser state.
+ \since 4.7
+ \brief The QDeclarativeParserStatus class provides updates on the QML parser state.
+
+ QDeclarativeParserStatus provides a mechanism for classes instantiated by
+ a QDeclarativeEngine to receive notification at key points in their creation.
+
+ This class is often used for optimization purposes, as it allows you to defer an
+ expensive operation until after all the properties have been set on an
+ object. For example, QML's \l {Text} element uses the parser status
+ to defer text layout until all of its properties have been set (we
+ don't want to layout when the \c text is assigned, and then relayout
+ when the \c font is assigned, and relayout again when the \c width is assigned,
+ and so on).
+
+ To use QDeclarativeParserStatus, you must inherit both a QObject-derived class
+ and QDeclarativeParserStatus, and use the Q_INTERFACES() macro.
+
+ \code
+ class MyObject : public QObject, public QDeclarativeParserStatus
+ {
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+
+ public:
+ MyObject(QObject *parent = 0);
+ ...
+ void classBegin();
+ void componentComplete();
+ }
+ \endcode
*/
/*! \internal */
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index 6e240d8..e657dd5 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -184,6 +184,7 @@ namespace QDeclarativePrivate
int listId;
int objectSize;
void (*create)(void *);
+ QString noCreationReason;
const char *uri;
int versionMajor;
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index afd0d84..3881d0a 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -64,6 +64,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeProperty
+\since 4.7
\brief The QDeclarativeProperty class abstracts accessing properties on objects created from QML.
As QML uses Qt's meta-type system all of the existing QMetaObject classes can be used to introspect
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
index b106d4f..a0ed78f 100644
--- a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
@@ -47,8 +47,10 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativePropertyValueSource
- \brief The QDeclarativePropertyValueSource class is inherited by property value sources such as animations and bindings.
- \internal
+ \brief The QDeclarativePropertyValueSource class is an interface for property value sources such as animations and bindings.
+
+ See \l{Property Value Sources} for information on writing custom property
+ value sources.
*/
/*!
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject.cpp b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
index fe0dce7..c2dce0a 100644
--- a/src/declarative/qml/qdeclarativeproxymetaobject.cpp
+++ b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
@@ -41,17 +41,11 @@
#include "private/qdeclarativeproxymetaobject_p.h"
-#include <QDebug>
-
QT_BEGIN_NAMESPACE
QDeclarativeProxyMetaObject::QDeclarativeProxyMetaObject(QObject *obj, QList<ProxyData> *mList)
: metaObjects(mList), proxies(0), parent(0), object(obj)
{
-#ifdef QDECLARATIVEPROXYMETAOBJECT_DEBUG
- qWarning() << "QDeclarativeProxyMetaObject" << obj->metaObject()->className();
-#endif
-
*static_cast<QMetaObject *>(this) = *metaObjects->first().metaObject;
QObjectPrivate *op = QObjectPrivate::get(obj);
@@ -59,14 +53,6 @@ QDeclarativeProxyMetaObject::QDeclarativeProxyMetaObject(QObject *obj, QList<Pro
parent = static_cast<QAbstractDynamicMetaObject*>(op->metaObject);
op->metaObject = this;
-
-#ifdef QDECLARATIVEPROXYMETAOBJECT_DEBUG
- const QMetaObject *mo = obj->metaObject();
- while(mo) {
- qWarning() << " " << mo->className();
- mo = mo->superClass();
- }
-#endif
}
QDeclarativeProxyMetaObject::~QDeclarativeProxyMetaObject()
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index ac49332..e7c8a12 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -296,27 +296,12 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
if (lastTypeDot >= 0)
resolvableObjectType.replace(QLatin1Char('.'),QLatin1Char('/'));
- bool isScript = resolvableObjectType == QLatin1String("Script");
-
- if (isScript) {
- if (_stateStack.isEmpty() || _stateStack.top().property) {
- QDeclarativeError error;
- error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid use of Script block"));
- error.setLine(typeLocation.startLine);
- error.setColumn(typeLocation.startColumn);
- _parser->_errors << error;
- return 0;
- }
- }
-
Object *obj = new Object;
- if (!isScript) {
- QDeclarativeScriptParser::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType);
- obj->type = typeRef->id;
+ QDeclarativeScriptParser::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType);
+ obj->type = typeRef->id;
- typeRef->refObjects.append(obj);
- }
+ typeRef->refObjects.append(obj);
// XXX this doesn't do anything (_scope never builds up)
_scope.append(resolvableObjectType);
@@ -325,11 +310,7 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
obj->location = location;
- if (isScript) {
-
- _stateStack.top().object->scriptBlockObjects.append(obj);
-
- } else if (propertyCount) {
+ if (propertyCount) {
Property *prop = currentProperty();
Value *v = new Value;
@@ -535,7 +516,6 @@ bool ProcessAST::visit(AST::UiPublicMember *node)
// { "time", Object::DynamicProperty::Time, "QTime" },
// { "date", Object::DynamicProperty::Date, "QDate" },
{ "date", Object::DynamicProperty::DateTime, "QDateTime" },
- { "var", Object::DynamicProperty::Variant, "QVariant" },
{ "variant", Object::DynamicProperty::Variant, "QVariant" }
};
const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) /
@@ -647,11 +627,6 @@ bool ProcessAST::visit(AST::UiPublicMember *node)
property.location = location(node->firstSourceLocation(),
node->lastSourceLocation());
- if (memberType == QLatin1String("var"))
- qWarning().nospace() << qPrintable(_parser->_scriptFile) << ":" << property.location.start.line << ":"
- << property.location.start.column << ": var type has been replaced by variant. "
- << "Support will be removed entirely shortly.";
-
if (node->expression) { // default value
property.defaultValue = new Property;
property.defaultValue->parent = _stateStack.top().object;
@@ -827,62 +802,29 @@ bool ProcessAST::visit(AST::UiSourceElement *node)
{
QDeclarativeParser::Object *obj = currentObject();
- bool isScript = (obj && obj->typeName == "Script");
-
- if (!isScript) {
-
- if (AST::FunctionDeclaration *funDecl = AST::cast<AST::FunctionDeclaration *>(node->sourceElement)) {
+ if (AST::FunctionDeclaration *funDecl = AST::cast<AST::FunctionDeclaration *>(node->sourceElement)) {
- Object::DynamicSlot slot;
- slot.location = location(funDecl->firstSourceLocation(), funDecl->lastSourceLocation());
+ Object::DynamicSlot slot;
+ slot.location = location(funDecl->firstSourceLocation(), funDecl->lastSourceLocation());
- AST::FormalParameterList *f = funDecl->formals;
- while (f) {
- slot.parameterNames << f->name->asString().toUtf8();
- f = f->finish();
- }
-
- QString body = textAt(funDecl->lbraceToken, funDecl->rbraceToken);
- slot.name = funDecl->name->asString().toUtf8();
- slot.body = body;
- obj->dynamicSlots << slot;
-
- } else {
- QDeclarativeError error;
- error.setDescription(QCoreApplication::translate("QDeclarativeParser","JavaScript declaration outside Script element"));
- error.setLine(node->firstSourceLocation().startLine);
- error.setColumn(node->firstSourceLocation().startColumn);
- _parser->_errors << error;
+ AST::FormalParameterList *f = funDecl->formals;
+ while (f) {
+ slot.parameterNames << f->name->asString().toUtf8();
+ f = f->finish();
}
- return false;
-
- } else {
- QString source;
- int line = 0;
- if (AST::FunctionDeclaration *funDecl = AST::cast<AST::FunctionDeclaration *>(node->sourceElement)) {
- line = funDecl->functionToken.startLine;
- source = asString(funDecl);
- } else if (AST::VariableStatement *varStmt = AST::cast<AST::VariableStatement *>(node->sourceElement)) {
- // ignore variable declarations
- line = varStmt->declarationKindToken.startLine;
+ QString body = textAt(funDecl->lbraceToken, funDecl->rbraceToken);
+ slot.name = funDecl->name->asString().toUtf8();
+ slot.body = body;
+ obj->dynamicSlots << slot;
- QDeclarativeError error;
- error.setDescription(QCoreApplication::translate("QDeclarativeParser", "Variable declarations not allow in inline Script blocks"));
- error.setLine(node->firstSourceLocation().startLine);
- error.setColumn(node->firstSourceLocation().startColumn);
- _parser->_errors << error;
- return false;
- }
-
- Value *value = new Value;
- value->location = location(node->firstSourceLocation(),
- node->lastSourceLocation());
- value->value = QDeclarativeParser::Variant(source);
-
- obj->getDefaultProperty()->addValue(value);
+ } else {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","JavaScript declaration outside Script element"));
+ error.setLine(node->firstSourceLocation().startLine);
+ error.setColumn(node->firstSourceLocation().startColumn);
+ _parser->_errors << error;
}
-
return false;
}
diff --git a/src/declarative/qml/qdeclarativescriptstring.cpp b/src/declarative/qml/qdeclarativescriptstring.cpp
index 5b9afe9..8f717d1 100644
--- a/src/declarative/qml/qdeclarativescriptstring.cpp
+++ b/src/declarative/qml/qdeclarativescriptstring.cpp
@@ -55,24 +55,35 @@ public:
/*!
\class QDeclarativeScriptString
- \since 4.7
+\since 4.7
\brief The QDeclarativeScriptString class encapsulates a script and its context.
-The QDeclarativeScriptString is used by properties that want to accept a script "assignment" from QML.
+QDeclarativeScriptString is used to create QObject properties that accept a script "assignment" from QML.
-Normally, the following code would result in a binding being established for the \c script
-property. If the property had a type of QDeclarativeScriptString, the script - \e {console.log(1921)} - itself
-would be passed to the property and it could choose how to handle it.
+Normally, the following QML would result in a binding being established for the \c script
+property; i.e. \c script would be assigned the value obtained from running \c {myObj.value = Math.max(myValue, 100)}
-\code
+\qml
MyType {
- script: console.log(1921)
+ script: myObj.value = Math.max(myValue, 100)
}
+\endqml
+
+If instead the property had a type of QDeclarativeScriptString,
+the script itself -- \e {myObj.value = Math.max(myValue, 100)} -- would be passed to the \c script property
+and the class could choose how to handle it. Typically, the class will evaluate
+the script at some later time using a QDeclarativeExpression.
+
+\code
+QDeclarativeExpression expr(scriptString.context(), scriptString.script(), scriptStr.scopeObject());
+expr.value();
\endcode
+
+\sa QDeclarativeExpression
*/
/*!
-Construct an empty instance.
+Constructs an empty instance.
*/
QDeclarativeScriptString::QDeclarativeScriptString()
: d(new QDeclarativeScriptStringPrivate)
@@ -80,7 +91,7 @@ QDeclarativeScriptString::QDeclarativeScriptString()
}
/*!
-Copy \a other.
+Copies \a other.
*/
QDeclarativeScriptString::QDeclarativeScriptString(const QDeclarativeScriptString &other)
: d(other.d)
@@ -95,7 +106,7 @@ QDeclarativeScriptString::~QDeclarativeScriptString()
}
/*!
-Assign \a other to this.
+Assigns \a other to this.
*/
QDeclarativeScriptString &QDeclarativeScriptString::operator=(const QDeclarativeScriptString &other)
{
@@ -104,7 +115,7 @@ QDeclarativeScriptString &QDeclarativeScriptString::operator=(const QDeclarative
}
/*!
-Return the context for the script.
+Returns the context for the script.
*/
QDeclarativeContext *QDeclarativeScriptString::context() const
{
diff --git a/src/declarative/qml/qdeclarativetypenotavailable.cpp b/src/declarative/qml/qdeclarativetypenotavailable.cpp
new file mode 100644
index 0000000..7a84732
--- /dev/null
+++ b/src/declarative/qml/qdeclarativetypenotavailable.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetypenotavailable_p.h"
+
+int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
+{
+ return qmlRegisterUncreatableType<QDeclarativeTypeNotAvailable>(uri,versionMajor,versionMinor,qmlName,message);
+}
+
+QDeclarativeTypeNotAvailable::QDeclarativeTypeNotAvailable() { }
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/qml/qdeclarativetypenotavailable_p.h
index 0de5854..9c1c256 100644
--- a/src/declarative/graphicsitems/qdeclarativeeffects_p.h
+++ b/src/declarative/qml/qdeclarativetypenotavailable_p.h
@@ -39,29 +39,27 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEEFFECTS_P_H
-#define QDECLARATIVEEFFECTS_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
+#ifndef QDECLARATIVETYPENOTAVAILABLE_H
+#define QDECLARATIVETYPENOTAVAILABLE_H
#include <qdeclarative.h>
-#include <QtGui/qgraphicseffect.h>
-#ifndef QT_NO_GRAPHICSEFFECT
-QML_DECLARE_TYPE(QGraphicsEffect)
-QML_DECLARE_TYPE(QGraphicsBlurEffect)
-QML_DECLARE_TYPE(QGraphicsColorizeEffect)
-QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
-QML_DECLARE_TYPE(QGraphicsOpacityEffect)
-#endif
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeTypeNotAvailable : public QObject {
+ Q_OBJECT
+public:
+ QDeclarativeTypeNotAvailable();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeTypeNotAvailable)
+
+QT_END_HEADER
-#endif // QDECLARATIVEEFFECTS_P_H
+#endif // QDECLARATIVETYPENOTAVAILABLE_H
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index 352a6c0..c6fe161 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -55,13 +55,15 @@ int qmlRegisterValueTypeEnums(const char *qmlName)
QByteArray pointerName(name + '*');
QDeclarativePrivate::RegisterType type = {
- 0,
+ 0,
qRegisterMetaType<T *>(pointerName.constData()), 0, 0, 0,
- "Qt", 4, 6, qmlName, &T::staticMetaObject,
+ QString(),
- 0, 0,
+ "Qt", 4, 7, qmlName, &T::staticMetaObject,
+
+ 0, 0,
0, 0, 0,
@@ -712,7 +714,7 @@ int QDeclarativeFontValueType::pixelSize() const
void QDeclarativeFontValueType::setPixelSize(int size)
{
- if (size >=0) {
+ if (size >0) {
if (pointSizeSet)
qWarning() << "Both point size and pixel size set. Using pixel size.";
font.setPixelSize(size);
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index fdcbeee..57bf726 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -623,13 +623,6 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
}
break;
- case QDeclarativeInstruction::StoreScript:
- {
- QObject *target = stack.top();
- ctxt->addScript(scripts.at(instr.storeScript.value), target);
- }
- break;
-
case QDeclarativeInstruction::StoreImportedScript:
{
ctxt->addImportedScript(scripts.at(instr.storeScript.value));
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index c4d47b3..45f04a0 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -86,7 +86,6 @@ public:
inline void setValue(const QDate &);
inline void setValue(const QDateTime &);
inline void setValue(const QScriptValue &);
-
private:
int type;
void *data[4]; // Large enough to hold all types
@@ -112,6 +111,9 @@ void QDeclarativeVMEVariant::cleanup()
type == QMetaType::Bool ||
type == QMetaType::Double) {
type = QVariant::Invalid;
+ } else if (type == QMetaType::QObjectStar) {
+ ((QDeclarativeGuard<QObject>*)dataPtr())->~QDeclarativeGuard<QObject>();
+ type = QVariant::Invalid;
} else if (type == QMetaType::QString) {
((QString *)dataPtr())->~QString();
type = QVariant::Invalid;
@@ -160,7 +162,7 @@ QObject *QDeclarativeVMEVariant::asQObject()
if (type != QMetaType::QObjectStar)
setValue((QObject *)0);
- return *(QObject **)(dataPtr());
+ return *(QDeclarativeGuard<QObject> *)(dataPtr());
}
const QVariant &QDeclarativeVMEVariant::asQVariant()
@@ -256,8 +258,9 @@ void QDeclarativeVMEVariant::setValue(QObject *v)
if (type != QMetaType::QObjectStar) {
cleanup();
type = QMetaType::QObjectStar;
+ new (dataPtr()) QDeclarativeGuard<QObject>();
}
- *(QObject **)(dataPtr()) = v;
+ *(QDeclarativeGuard<QObject>*)(dataPtr()) = v;
}
void QDeclarativeVMEVariant::setValue(const QVariant &v)
@@ -465,8 +468,7 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
if (c == QMetaObject::ReadProperty) {
*reinterpret_cast<QVariant *>(a[0]) = readVarPropertyAsVariant(id);
} else if (c == QMetaObject::WriteProperty) {
- needActivate = (data[id].asQVariant() != *reinterpret_cast<QVariant *>(a[0]));
- data[id].setValue(*reinterpret_cast<QVariant *>(a[0]));
+ writeVarProperty(id, *reinterpret_cast<QVariant *>(a[0]));
}
} else {
@@ -682,6 +684,8 @@ QScriptValue QDeclarativeVMEMetaObject::readVarProperty(int id)
{
if (data[id].dataType() == qMetaTypeId<QScriptValue>())
return data[id].asQScriptValue();
+ else if (data[id].dataType() == QMetaType::QObjectStar)
+ return QDeclarativeEnginePrivate::get(ctxt->engine)->objectClass->newQObject(data[id].asQObject());
else
return QDeclarativeEnginePrivate::get(ctxt->engine)->scriptValueFromVariant(data[id].asQVariant());
}
@@ -690,7 +694,9 @@ QVariant QDeclarativeVMEMetaObject::readVarPropertyAsVariant(int id)
{
if (data[id].dataType() == qMetaTypeId<QScriptValue>())
return QDeclarativeEnginePrivate::get(ctxt->engine)->scriptValueToVariant(data[id].asQScriptValue());
- else
+ else if (data[id].dataType() == QMetaType::QObjectStar)
+ return QVariant::fromValue(data[id].asQObject());
+ else
return data[id].asQVariant();
}
@@ -700,6 +706,15 @@ void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QScriptValue &val
activate(object, methodOffset + id, 0);
}
+void QDeclarativeVMEMetaObject::writeVarProperty(int id, const QVariant &value)
+{
+ if (value.userType() == QMetaType::QObjectStar)
+ data[id].setValue(qvariant_cast<QObject *>(value));
+ else
+ data[id].setValue(value);
+ activate(object, methodOffset + id, 0);
+}
+
void QDeclarativeVMEMetaObject::listChanged(int id)
{
activate(object, methodOffset + id, 0);
diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/declarative/qml/qdeclarativevmemetaobject_p.h
index 76390c9..4fc3269 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject_p.h
+++ b/src/declarative/qml/qdeclarativevmemetaobject_p.h
@@ -148,6 +148,7 @@ private:
QScriptValue readVarProperty(int);
QVariant readVarPropertyAsVariant(int);
void writeVarProperty(int, const QScriptValue &);
+ void writeVarProperty(int, const QVariant &);
QAbstractDynamicMetaObject *parent;
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index be2a1a7..b7e1832 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -1305,7 +1305,7 @@ void QDeclarativeXMLHttpRequest::printError(const QScriptValue& sv)
{
QDeclarativeError error;
QDeclarativeExpressionPrivate::exceptionToError(sv.engine(), error);
- qWarning().nospace() << qPrintable(error.toString());
+ QDeclarativeEnginePrivate::warning(QDeclarativeEnginePrivate::get(sv.engine()), error);
}
void QDeclarativeXMLHttpRequest::destroyNetwork()
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index c48662c..3848593 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -40,6 +40,7 @@ SOURCES += \
$$PWD/qdeclarativepropertycache.cpp \
$$PWD/qdeclarativenotifier.cpp \
$$PWD/qdeclarativeintegercache.cpp \
+ $$PWD/qdeclarativetypenotavailable.cpp \
$$PWD/qdeclarativetypenamecache.cpp \
$$PWD/qdeclarativescriptstring.cpp \
$$PWD/qdeclarativeobjectscriptclass.cpp \
@@ -112,6 +113,7 @@ HEADERS += \
$$PWD/qdeclarativepropertycache_p.h \
$$PWD/qdeclarativenotifier_p.h \
$$PWD/qdeclarativeintegercache_p.h \
+ $$PWD/qdeclarativetypenotavailable_p.h \
$$PWD/qdeclarativetypenamecache_p.h \
$$PWD/qdeclarativescriptstring.h \
$$PWD/qdeclarativeobjectscriptclass_p.h \
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 7e20428..4f7719b 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -185,7 +185,7 @@ void QDeclarativeAbstractAnimation::setRunning(bool r)
return;
if (d->group || d->disableUserControl) {
- qWarning("QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ qmlInfo(this) << "setRunning() cannot be used on non-root animation nodes.";
return;
}
@@ -245,7 +245,7 @@ void QDeclarativeAbstractAnimation::setPaused(bool p)
return;
if (d->group || d->disableUserControl) {
- qWarning("QDeclarativeAbstractAnimation: setPaused() cannot be used on non-root animation nodes");
+ qmlInfo(this) << "setPaused() cannot be used on non-root animation nodes.";
return;
}
@@ -781,8 +781,8 @@ void QDeclarativeScriptActionPrivate::execute()
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
expr.value();
- if (expr.hasError())
- qWarning() << expr.error();
+ if (expr.hasError())
+ qmlInfo(q) << expr.error();
}
}
@@ -1316,7 +1316,7 @@ void QDeclarativeRotationAnimation::setTo(qreal t)
}
/*!
- \qmlproperty enum RotationAnimation::direction
+ \qmlproperty enumeration RotationAnimation::direction
The direction in which to rotate.
Possible values are Numerical, Clockwise, Counterclockwise,
or Shortest.
@@ -1674,7 +1674,7 @@ void QDeclarativePropertyAnimationPrivate::init()
/*!
\qmlproperty int PropertyAnimation::duration
- This property holds the duration of the transition, in milliseconds.
+ This property holds the duration of the animation, in milliseconds.
The default value is 250.
*/
@@ -1741,14 +1741,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
}
/*!
- \qmlproperty enum PropertyAnimation::easing.type
+ \qmlproperty enumeration PropertyAnimation::easing.type
\qmlproperty real PropertyAnimation::easing.amplitude
\qmlproperty real PropertyAnimation::easing.overshoot
\qmlproperty real PropertyAnimation::easing.period
\brief the easing curve used for the animation.
To specify an easing curve you need to specify at least the type. For some curves you can also specify
- amplitude, period and/or overshoot (more details provided after the table).
+ amplitude, period and/or overshoot (more details provided after the table). The default easing curve is
+ Linear.
\qml
PropertyAnimation { properties: "y"; easing.type: "InOutElastic"; easing.amplitude: 2.0; easing.period: 1.5 }
@@ -2689,6 +2690,67 @@ QDeclarativeListProperty<QDeclarativeItem> QDeclarativeAnchorAnimation::targets(
return QDeclarativeListProperty<QDeclarativeItem>(this, d->targets);
}
+/*!
+ \qmlproperty int AnchorAnimation::duration
+ This property holds the duration of the animation, in milliseconds.
+
+ The default value is 250.
+*/
+int QDeclarativeAnchorAnimation::duration() const
+{
+ Q_D(const QDeclarativeAnchorAnimation);
+ return d->va->duration();
+}
+
+void QDeclarativeAnchorAnimation::setDuration(int duration)
+{
+ if (duration < 0) {
+ qmlInfo(this) << tr("Cannot set a duration of < 0");
+ return;
+ }
+
+ Q_D(QDeclarativeAnchorAnimation);
+ if (d->va->duration() == duration)
+ return;
+ d->va->setDuration(duration);
+ emit durationChanged(duration);
+}
+
+/*!
+ \qmlproperty enumeration AnchorAnimation::easing.type
+ \qmlproperty real AnchorAnimation::easing.amplitude
+ \qmlproperty real AnchorAnimation::easing.overshoot
+ \qmlproperty real AnchorAnimation::easing.period
+ \brief the easing curve used for the animation.
+
+ To specify an easing curve you need to specify at least the type. For some curves you can also specify
+ amplitude, period and/or overshoot. The default easing curve is
+ Linear.
+
+ \qml
+ AnchorAnimation { easing.type: "InOutQuad" }
+ \endqml
+
+ See the \l{PropertyAnimation::easing.type} documentation for information
+ about the different types of easing curves.
+*/
+
+QEasingCurve QDeclarativeAnchorAnimation::easing() const
+{
+ Q_D(const QDeclarativeAnchorAnimation);
+ return d->va->easingCurve();
+}
+
+void QDeclarativeAnchorAnimation::setEasing(const QEasingCurve &e)
+{
+ Q_D(QDeclarativeAnchorAnimation);
+ if (d->va->easingCurve() == e)
+ return;
+
+ d->va->setEasingCurve(e);
+ emit easingChanged(e);
+}
+
void QDeclarativeAnchorAnimation::transition(QDeclarativeStateActions &actions,
QDeclarativeProperties &modified,
TransitionDirection direction)
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index c839c2c..40c893c 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -475,6 +475,8 @@ class QDeclarativeAnchorAnimation : public QDeclarativeAbstractAnimation
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeAnchorAnimation)
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> targets READ targets)
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
+ Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
public:
QDeclarativeAnchorAnimation(QObject *parent=0);
@@ -482,6 +484,16 @@ public:
QDeclarativeListProperty<QDeclarativeItem> targets();
+ int duration() const;
+ void setDuration(int);
+
+ QEasingCurve easing() const;
+ void setEasing(const QEasingCurve &);
+
+Q_SIGNALS:
+ void durationChanged(int);
+ void easingChanged(const QEasingCurve&);
+
protected:
virtual void transition(QDeclarativeStateActions &actions,
QDeclarativeProperties &modified,
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index b577b81..4115193 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -53,6 +53,7 @@
#include <QFontDatabase>
#include <private/qobject_p.h>
+#include <qdeclarativeinfo.h>
QT_BEGIN_NAMESPACE
@@ -136,7 +137,7 @@ void QDeclarativeFontLoader::setSource(const QUrl &url)
d->status = QDeclarativeFontLoader::Ready;
} else {
d->status = QDeclarativeFontLoader::Error;
- qWarning() << "Cannot load font:" << url;
+ qmlInfo(this) << "Cannot load font: \"" << url.toString() << "\"";
}
emit statusChanged();
} else
@@ -181,7 +182,7 @@ void QDeclarativeFontLoader::setName(const QString &name)
}
/*!
- \qmlproperty enum FontLoader::status
+ \qmlproperty enumeration FontLoader::status
This property holds the status of font loading. It can be one of:
\list
@@ -231,7 +232,7 @@ void QDeclarativeFontLoader::replyFinished()
d->addFontToDatabase(ba);
} else {
d->status = Error;
- qWarning() << "Cannot load font:" << d->reply->url();
+ qmlInfo(this) << "Cannot load font: \"" << d->reply->url().toString() << "\"";
emit statusChanged();
}
d->reply->deleteLater();
@@ -250,7 +251,7 @@ void QDeclarativeFontLoaderPrivate::addFontToDatabase(const QByteArray &ba)
status = QDeclarativeFontLoader::Ready;
} else {
status = QDeclarativeFontLoader::Error;
- qWarning() << "Cannot load font:" << url;
+ qmlInfo(q) << "Cannot load font: \"" << url.toString() << "\"";
}
emit q->statusChanged();
}
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 2616ccf..6e980d0 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -1187,10 +1187,9 @@ QScriptValue NestedListModel::get(int index) const
if (!node)
return 0;
QDeclarativeEngine *eng = qmlEngine(m_listModel);
- if (!eng) {
- qWarning("Cannot call QDeclarativeListModel::get() without a QDeclarativeEngine");
+ if (!eng)
return 0;
- }
+
return QDeclarativeEnginePrivate::qmlScriptObject(node->object(this), eng);
}
diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
index d91b107..534c923 100644
--- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
+++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
@@ -202,10 +202,9 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e)
FlatListModel *orig = m_orig->m_flat;
FlatListModel *copy = s->list->m_flat;
- if (!orig || !copy) {
- qWarning("QML ListModel worker: sync() failed");
+ if (!orig || !copy)
return QObject::event(e);
- }
+
orig->m_roles = copy->m_roles;
orig->m_strings = copy->m_strings;
orig->m_values = copy->m_values;
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 9c3ee9f..8a6937d 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -159,12 +159,12 @@ public:
QDeclarativeExpression *rewindExpression;
QDeclarativeGuard<QDeclarativeExpression> ownedExpression;
- virtual void execute() {
+ virtual void execute(Reason) {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, expression);
}
virtual bool isReversable() { return true; }
- virtual void reverse() {
+ virtual void reverse(Reason) {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression);
}
diff --git a/src/declarative/util/qdeclarativepropertymap.cpp b/src/declarative/util/qdeclarativepropertymap.cpp
index 0e477b1..919727f 100644
--- a/src/declarative/util/qdeclarativepropertymap.cpp
+++ b/src/declarative/util/qdeclarativepropertymap.cpp
@@ -98,7 +98,7 @@ void QDeclarativePropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilde
/*!
\class QDeclarativePropertyMap
\since 4.7
- \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in bindings.
+ \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in QML bindings.
QDeclarativePropertyMap provides a convenient way to expose domain data to the UI layer.
The following example shows how you might declare data in C++ and then
@@ -112,7 +112,7 @@ void QDeclarativePropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilde
ownerData.insert("phone", QVariant(QString("555-5555")));
//expose it to the UI layer
- QDeclarativeContext *ctxt = view->bindContext();
+ QDeclarativeContext *ctxt = view->rootContext();
ctxt->setProperty("owner", &data);
\endcode
@@ -265,7 +265,7 @@ QVariant &QDeclarativePropertyMap::operator[](const QString &key)
Same as value().
*/
-const QVariant QDeclarativePropertyMap::operator[](const QString &key) const
+QVariant QDeclarativePropertyMap::operator[](const QString &key) const
{
return value(key);
}
diff --git a/src/declarative/util/qdeclarativepropertymap.h b/src/declarative/util/qdeclarativepropertymap.h
index e0b7ce3..1b6594b 100644
--- a/src/declarative/util/qdeclarativepropertymap.h
+++ b/src/declarative/util/qdeclarativepropertymap.h
@@ -73,7 +73,7 @@ public:
bool contains(const QString &key) const;
QVariant &operator[](const QString &key);
- const QVariant operator[](const QString &key) const;
+ QVariant operator[](const QString &key) const;
Q_SIGNALS:
void valueChanged(const QString &key, const QVariant &value);
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index 48a7583..19a00ee 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -438,7 +438,7 @@ qreal QDeclarativeSmoothedAnimation::velocity() const
}
/*!
- \qmlproperty qreal SmoothedAnimation::velocity
+ \qmlproperty real SmoothedAnimation::velocity
This property holds the average velocity allowed when tracking the 'to' value.
@@ -457,7 +457,7 @@ void QDeclarativeSmoothedAnimation::setVelocity(qreal v)
}
/*!
- \qmlproperty qreal SmoothedAnimation::maximumEasingTime
+ \qmlproperty int SmoothedAnimation::maximumEasingTime
This property specifies the maximum time, in msecs, an "eases" during the follow should take.
Setting this property causes the velocity to "level out" after at a time. Setting
diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp
index 9f155fc..3ed9257 100644
--- a/src/declarative/util/qdeclarativesmoothedfollow.cpp
+++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp
@@ -195,7 +195,7 @@ qreal QDeclarativeSmoothedFollow::velocity() const
}
/*!
- \qmlproperty qreal SmoothedFollow::velocity
+ \qmlproperty real SmoothedFollow::velocity
This property holds the average velocity allowed when tracking the 'to' value.
@@ -214,7 +214,7 @@ void QDeclarativeSmoothedFollow::setVelocity(qreal v)
}
/*!
- \qmlproperty qreal SmoothedFollow::maximumEasingTime
+ \qmlproperty int SmoothedFollow::maximumEasingTime
This property specifies the maximum time, in msecs, an "eases" during the follow should take.
Setting this property causes the velocity to "level out" after at a time. Setting
diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp
index 7921735..70077f3 100644
--- a/src/declarative/util/qdeclarativespringfollow.cpp
+++ b/src/declarative/util/qdeclarativespringfollow.cpp
@@ -267,7 +267,7 @@ qreal QDeclarativeSpringFollow::to() const
}
/*!
- \qmlproperty qreal SpringFollow::to
+ \qmlproperty real SpringFollow::to
This property holds the target value which will be tracked.
Bind to a property in order to track its changes.
@@ -284,7 +284,7 @@ void QDeclarativeSpringFollow::setTo(qreal value)
}
/*!
- \qmlproperty qreal SpringFollow::velocity
+ \qmlproperty real SpringFollow::velocity
This property holds the maximum velocity allowed when tracking the source.
*/
@@ -303,7 +303,7 @@ void QDeclarativeSpringFollow::setVelocity(qreal velocity)
}
/*!
- \qmlproperty qreal SpringFollow::spring
+ \qmlproperty real SpringFollow::spring
This property holds the spring constant
The spring constant describes how strongly the target is pulled towards the
@@ -326,7 +326,7 @@ void QDeclarativeSpringFollow::setSpring(qreal spring)
}
/*!
- \qmlproperty qreal SpringFollow::damping
+ \qmlproperty real SpringFollow::damping
This property holds the spring damping constant
The damping constant describes how quickly a sprung follower comes to rest.
@@ -349,7 +349,7 @@ void QDeclarativeSpringFollow::setDamping(qreal damping)
/*!
- \qmlproperty qreal SpringFollow::epsilon
+ \qmlproperty real SpringFollow::epsilon
This property holds the spring epsilon
The epsilon is the rate and amount of change in the value which is close enough
@@ -371,7 +371,7 @@ void QDeclarativeSpringFollow::setEpsilon(qreal epsilon)
}
/*!
- \qmlproperty qreal SpringFollow::modulus
+ \qmlproperty real SpringFollow::modulus
This property holds the modulus value.
Setting a \a modulus forces the target value to "wrap around" at the modulus.
@@ -394,7 +394,7 @@ void QDeclarativeSpringFollow::setModulus(qreal modulus)
}
/*!
- \qmlproperty qreal SpringFollow::mass
+ \qmlproperty real SpringFollow::mass
This property holds the "mass" of the property being moved.
mass is 1.0 by default. Setting a different mass changes the dynamics of
@@ -452,7 +452,7 @@ bool QDeclarativeSpringFollow::inSync() const
}
/*!
- \qmlproperty qreal SpringFollow::value
+ \qmlproperty real SpringFollow::value
The current value.
*/
qreal QDeclarativeSpringFollow::value() const
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 78813fa..684f527 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -95,7 +95,7 @@ QString QDeclarativeActionEvent::typeName() const
return QString();
}
-void QDeclarativeActionEvent::execute()
+void QDeclarativeActionEvent::execute(Reason)
{
}
@@ -104,7 +104,7 @@ bool QDeclarativeActionEvent::isReversable()
return false;
}
-void QDeclarativeActionEvent::reverse()
+void QDeclarativeActionEvent::reverse(Reason)
{
}
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
index 472897e..0ba67b0 100644
--- a/src/declarative/util/qdeclarativestate_p.h
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -90,9 +90,11 @@ public:
virtual ~QDeclarativeActionEvent();
virtual QString typeName() const;
- virtual void execute();
+ enum Reason { ActualChange, FastForward };
+
+ virtual void execute(Reason reason = ActualChange);
virtual bool isReversable();
- virtual void reverse();
+ virtual void reverse(Reason reason = ActualChange);
virtual void saveOriginals() {}
virtual void copyOriginals(QDeclarativeActionEvent *) {}
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index ff78c60..81f4230 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -50,6 +50,7 @@
#include <QtCore/qdebug.h>
#include <private/qobject_p.h>
+#include <qdeclarativeinfo.h>
QT_BEGIN_NAMESPACE
@@ -381,7 +382,7 @@ void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state
}
if (applyingState) {
- qWarning() << "Can't apply a state change as part of a state definition.";
+ qmlInfo(q) << "Can't apply a state change as part of a state definition.";
return;
}
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 3854b10..0aad498 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -50,6 +50,8 @@
#include <qdeclarativeguard_p.h>
#include <qdeclarativenullablevalue_p_p.h>
#include "private/qdeclarativecontext_p.h"
+#include "private/qdeclarativeproperty_p.h"
+#include "private/qdeclarativebinding_p.h"
#include <QtCore/qdebug.h>
#include <QtGui/qgraphicsitem.h>
@@ -86,7 +88,6 @@ public:
void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore)
{
if (targetParent && target && target->parentItem()) {
- //### for backwards direction, can we just restore original x, y, scale, rotation
Q_Q(QDeclarativeParentChange);
bool ok;
const QTransform &transform = target->parentItem()->itemTransform(targetParent, &ok);
@@ -123,6 +124,10 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q
const QPointF &point = transform.map(QPointF(target->x(),target->y()));
qreal x = point.x();
qreal y = point.y();
+
+ // setParentItem will update the transformOriginPoint if needed
+ target->setParentItem(targetParent);
+
if (ok && target->transformOrigin() != QDeclarativeItem::TopLeft) {
qreal tempxt = target->transformOriginPoint().x();
qreal tempyt = target->transformOriginPoint().y();
@@ -136,7 +141,6 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q
y += offset.y();
}
- target->setParentItem(targetParent);
if (ok) {
//qDebug() << x << y << rotation << scale;
target->setX(x);
@@ -415,7 +419,7 @@ void QDeclarativeParentChange::copyOriginals(QDeclarativeActionEvent *other)
saveCurrentValues();
}
-void QDeclarativeParentChange::execute()
+void QDeclarativeParentChange::execute(Reason)
{
Q_D(QDeclarativeParentChange);
d->doChange(d->parent);
@@ -426,7 +430,7 @@ bool QDeclarativeParentChange::isReversable()
return true;
}
-void QDeclarativeParentChange::reverse()
+void QDeclarativeParentChange::reverse(Reason)
{
Q_D(QDeclarativeParentChange);
d->doChange(d->origParent, d->origStackBefore);
@@ -566,7 +570,7 @@ void QDeclarativeStateChangeScript::setName(const QString &n)
d->name = n;
}
-void QDeclarativeStateChangeScript::execute()
+void QDeclarativeStateChangeScript::execute(Reason)
{
Q_D(QDeclarativeStateChangeScript);
const QString &script = d->script.script();
@@ -577,7 +581,7 @@ void QDeclarativeStateChangeScript::execute()
expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
expr.value();
if (expr.hasError())
- qWarning() << expr.error();
+ qmlInfo(this, expr.error());
}
}
@@ -601,15 +605,22 @@ QString QDeclarativeStateChangeScript::typeName() const
In the following example we change the top and bottom anchors of an item:
\qml
- AnchorChanges {
- target: content; top: window.top; bottom: window.bottom
+ State {
+ name: "reanchored"
+ AnchorChanges {
+ target: content;
+ anchors.top: window.top;
+ anchors.bottom: window.bottom
+ }
}
\endqml
AnchorChanges can be animated using AnchorAnimation.
\qml
//animate our anchor changes
- AnchorAnimation {}
+ Transition {
+ AnchorAnimation {}
+ }
\endqml
For more information on anchors see \l {anchor-layout}{Anchor Layouts}.
@@ -620,26 +631,25 @@ class QDeclarativeAnchorSetPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QDeclarativeAnchorSet)
public:
QDeclarativeAnchorSetPrivate()
- : usedAnchors(0), fill(0),
+ : usedAnchors(0), resetAnchors(0), fill(0),
centerIn(0)/*, leftMargin(0), rightMargin(0), topMargin(0), bottomMargin(0),
margins(0), vCenterOffset(0), hCenterOffset(0), baselineOffset(0)*/
{
}
- QDeclarativeAnchors::UsedAnchors usedAnchors;
- //### change to QDeclarativeAnchors::UsedAnchors resetAnchors
- QStringList resetList;
+ QDeclarativeAnchors::Anchors usedAnchors;
+ QDeclarativeAnchors::Anchors resetAnchors;
QDeclarativeItem *fill;
QDeclarativeItem *centerIn;
- QDeclarativeAnchorLine left;
- QDeclarativeAnchorLine right;
- QDeclarativeAnchorLine top;
- QDeclarativeAnchorLine bottom;
- QDeclarativeAnchorLine vCenter;
- QDeclarativeAnchorLine hCenter;
- QDeclarativeAnchorLine baseline;
+ QDeclarativeScriptString leftScript;
+ QDeclarativeScriptString rightScript;
+ QDeclarativeScriptString topScript;
+ QDeclarativeScriptString bottomScript;
+ QDeclarativeScriptString hCenterScript;
+ QDeclarativeScriptString vCenterScript;
+ QDeclarativeScriptString baselineScript;
/*qreal leftMargin;
qreal rightMargin;
@@ -660,151 +670,165 @@ QDeclarativeAnchorSet::~QDeclarativeAnchorSet()
{
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::top() const
+QDeclarativeScriptString QDeclarativeAnchorSet::top() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->top;
+ return d->topScript;
}
-void QDeclarativeAnchorSet::setTop(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setTop(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasTopAnchor;
- d->top = edge;
+ d->usedAnchors |= QDeclarativeAnchors::TopAnchor;
+ d->topScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetTop();
}
void QDeclarativeAnchorSet::resetTop()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasTopAnchor;
- d->top = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("top");
+ d->usedAnchors &= ~QDeclarativeAnchors::TopAnchor;
+ d->topScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::TopAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::bottom() const
+QDeclarativeScriptString QDeclarativeAnchorSet::bottom() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->bottom;
+ return d->bottomScript;
}
-void QDeclarativeAnchorSet::setBottom(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setBottom(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasBottomAnchor;
- d->bottom = edge;
+ d->usedAnchors |= QDeclarativeAnchors::BottomAnchor;
+ d->bottomScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetBottom();
}
void QDeclarativeAnchorSet::resetBottom()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasBottomAnchor;
- d->bottom = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("bottom");
+ d->usedAnchors &= ~QDeclarativeAnchors::BottomAnchor;
+ d->bottomScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::BottomAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::verticalCenter() const
+QDeclarativeScriptString QDeclarativeAnchorSet::verticalCenter() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->vCenter;
+ return d->vCenterScript;
}
-void QDeclarativeAnchorSet::setVerticalCenter(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setVerticalCenter(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasVCenterAnchor;
- d->vCenter = edge;
+ d->usedAnchors |= QDeclarativeAnchors::VCenterAnchor;
+ d->vCenterScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetVerticalCenter();
}
void QDeclarativeAnchorSet::resetVerticalCenter()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasVCenterAnchor;
- d->vCenter = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("verticalCenter");
+ d->usedAnchors &= ~QDeclarativeAnchors::VCenterAnchor;
+ d->vCenterScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::VCenterAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::baseline() const
+QDeclarativeScriptString QDeclarativeAnchorSet::baseline() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->baseline;
+ return d->baselineScript;
}
-void QDeclarativeAnchorSet::setBaseline(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setBaseline(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasBaselineAnchor;
- d->baseline = edge;
+ d->usedAnchors |= QDeclarativeAnchors::BaselineAnchor;
+ d->baselineScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetBaseline();
}
void QDeclarativeAnchorSet::resetBaseline()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasBaselineAnchor;
- d->baseline = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("baseline");
+ d->usedAnchors &= ~QDeclarativeAnchors::BaselineAnchor;
+ d->baselineScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::BaselineAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::left() const
+QDeclarativeScriptString QDeclarativeAnchorSet::left() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->left;
+ return d->leftScript;
}
-void QDeclarativeAnchorSet::setLeft(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setLeft(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasLeftAnchor;
- d->left = edge;
+ d->usedAnchors |= QDeclarativeAnchors::LeftAnchor;
+ d->leftScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetLeft();
}
void QDeclarativeAnchorSet::resetLeft()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasLeftAnchor;
- d->left = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("left");
+ d->usedAnchors &= ~QDeclarativeAnchors::LeftAnchor;
+ d->leftScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::LeftAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::right() const
+QDeclarativeScriptString QDeclarativeAnchorSet::right() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->right;
+ return d->rightScript;
}
-void QDeclarativeAnchorSet::setRight(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setRight(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasRightAnchor;
- d->right = edge;
+ d->usedAnchors |= QDeclarativeAnchors::RightAnchor;
+ d->rightScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetRight();
}
void QDeclarativeAnchorSet::resetRight()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasRightAnchor;
- d->right = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("right");
+ d->usedAnchors &= ~QDeclarativeAnchors::RightAnchor;
+ d->rightScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::RightAnchor;
}
-QDeclarativeAnchorLine QDeclarativeAnchorSet::horizontalCenter() const
+QDeclarativeScriptString QDeclarativeAnchorSet::horizontalCenter() const
{
Q_D(const QDeclarativeAnchorSet);
- return d->hCenter;
+ return d->hCenterScript;
}
-void QDeclarativeAnchorSet::setHorizontalCenter(const QDeclarativeAnchorLine &edge)
+void QDeclarativeAnchorSet::setHorizontalCenter(const QDeclarativeScriptString &edge)
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors |= QDeclarativeAnchors::HasHCenterAnchor;
- d->hCenter = edge;
+ d->usedAnchors |= QDeclarativeAnchors::HCenterAnchor;
+ d->hCenterScript = edge;
+ if (edge.script() == QLatin1String("undefined"))
+ resetHorizontalCenter();
}
void QDeclarativeAnchorSet::resetHorizontalCenter()
{
Q_D(QDeclarativeAnchorSet);
- d->usedAnchors &= ~QDeclarativeAnchors::HasHCenterAnchor;
- d->hCenter = QDeclarativeAnchorLine();
- d->resetList << QLatin1String("horizontalCenter");
+ d->usedAnchors &= ~QDeclarativeAnchors::HCenterAnchor;
+ d->hCenterScript = QDeclarativeScriptString();
+ d->resetAnchors |= QDeclarativeAnchors::HCenterAnchor;
}
QDeclarativeItem *QDeclarativeAnchorSet::fill() const
@@ -846,19 +870,35 @@ class QDeclarativeAnchorChangesPrivate : public QObjectPrivate
{
public:
QDeclarativeAnchorChangesPrivate()
- : target(0), anchorSet(new QDeclarativeAnchorSet) {}
+ : target(0), anchorSet(new QDeclarativeAnchorSet),
+ leftBinding(0), rightBinding(0), hCenterBinding(0),
+ topBinding(0), bottomBinding(0), vCenterBinding(0), baselineBinding(0),
+ origLeftBinding(0), origRightBinding(0), origHCenterBinding(0),
+ origTopBinding(0), origBottomBinding(0), origVCenterBinding(0),
+ origBaselineBinding(0)
+ {
+
+ }
~QDeclarativeAnchorChangesPrivate() { delete anchorSet; }
QDeclarativeItem *target;
QDeclarativeAnchorSet *anchorSet;
- QDeclarativeAnchorLine origLeft;
- QDeclarativeAnchorLine origRight;
- QDeclarativeAnchorLine origHCenter;
- QDeclarativeAnchorLine origTop;
- QDeclarativeAnchorLine origBottom;
- QDeclarativeAnchorLine origVCenter;
- QDeclarativeAnchorLine origBaseline;
+ QDeclarativeBinding *leftBinding;
+ QDeclarativeBinding *rightBinding;
+ QDeclarativeBinding *hCenterBinding;
+ QDeclarativeBinding *topBinding;
+ QDeclarativeBinding *bottomBinding;
+ QDeclarativeBinding *vCenterBinding;
+ QDeclarativeBinding *baselineBinding;
+
+ QDeclarativeAbstractBinding *origLeftBinding;
+ QDeclarativeAbstractBinding *origRightBinding;
+ QDeclarativeAbstractBinding *origHCenterBinding;
+ QDeclarativeAbstractBinding *origTopBinding;
+ QDeclarativeAbstractBinding *origBottomBinding;
+ QDeclarativeAbstractBinding *origVCenterBinding;
+ QDeclarativeAbstractBinding *origBaselineBinding;
QDeclarativeAnchorLine rewindLeft;
QDeclarativeAnchorLine rewindRight;
@@ -890,6 +930,16 @@ public:
bool applyOrigBottom;
bool applyOrigVCenter;
bool applyOrigBaseline;
+
+ QList<QDeclarativeAbstractBinding*> oldBindings;
+
+ QDeclarativeProperty leftProp;
+ QDeclarativeProperty rightProp;
+ QDeclarativeProperty hCenterProp;
+ QDeclarativeProperty topProp;
+ QDeclarativeProperty bottomProp;
+ QDeclarativeProperty vCenterProp;
+ QDeclarativeProperty baselineProp;
};
/*!
@@ -908,6 +958,47 @@ QDeclarativeAnchorChanges::~QDeclarativeAnchorChanges()
QDeclarativeAnchorChanges::ActionList QDeclarativeAnchorChanges::actions()
{
+ Q_D(QDeclarativeAnchorChanges);
+ d->leftBinding = d->rightBinding = d->hCenterBinding = d->topBinding
+ = d->bottomBinding = d->vCenterBinding = d->baselineBinding = 0;
+
+ d->leftProp = QDeclarativeProperty(d->target, QLatin1String("anchors.left"));
+ d->rightProp = QDeclarativeProperty(d->target, QLatin1String("anchors.right"));
+ d->hCenterProp = QDeclarativeProperty(d->target, QLatin1String("anchors.horizontalCenter"));
+ d->topProp = QDeclarativeProperty(d->target, QLatin1String("anchors.top"));
+ d->bottomProp = QDeclarativeProperty(d->target, QLatin1String("anchors.bottom"));
+ d->vCenterProp = QDeclarativeProperty(d->target, QLatin1String("anchors.verticalCenter"));
+ d->baselineProp = QDeclarativeProperty(d->target, QLatin1String("anchors.baseline"));
+
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::LeftAnchor) {
+ d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, qmlContext(this));
+ d->leftBinding->setTarget(d->leftProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::RightAnchor) {
+ d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, qmlContext(this));
+ d->rightBinding->setTarget(d->rightProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
+ d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, qmlContext(this));
+ d->hCenterBinding->setTarget(d->hCenterProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::TopAnchor) {
+ d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, qmlContext(this));
+ d->topBinding->setTarget(d->topProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BottomAnchor) {
+ d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, qmlContext(this));
+ d->bottomBinding->setTarget(d->bottomProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::VCenterAnchor) {
+ d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, qmlContext(this));
+ d->vCenterBinding->setTarget(d->vCenterProp);
+ }
+ if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BaselineAnchor) {
+ d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, qmlContext(this));
+ d->baselineBinding->setTarget(d->baselineProp);
+ }
+
QDeclarativeAction a;
a.event = this;
return ActionList() << a;
@@ -952,59 +1043,104 @@ void QDeclarativeAnchorChanges::setObject(QDeclarativeItem *target)
\endqml
*/
-void QDeclarativeAnchorChanges::execute()
+void QDeclarativeAnchorChanges::execute(Reason reason)
{
Q_D(QDeclarativeAnchorChanges);
if (!d->target)
return;
//incorporate any needed "reverts"
- if (d->applyOrigLeft)
- d->target->anchors()->setLeft(d->origLeft);
- if (d->applyOrigRight)
- d->target->anchors()->setRight(d->origRight);
- if (d->applyOrigHCenter)
- d->target->anchors()->setHorizontalCenter(d->origHCenter);
- if (d->applyOrigTop)
- d->target->anchors()->setTop(d->origTop);
- if (d->applyOrigBottom)
- d->target->anchors()->setBottom(d->origBottom);
- if (d->applyOrigVCenter)
- d->target->anchors()->setVerticalCenter(d->origVCenter);
- if (d->applyOrigBaseline)
- d->target->anchors()->setBaseline(d->origBaseline);
-
- //reset any anchors that have been specified
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("left")))
+ if (d->applyOrigLeft) {
+ if (!d->origLeftBinding)
+ d->target->anchors()->resetLeft();
+ QDeclarativePropertyPrivate::setBinding(d->leftProp, d->origLeftBinding);
+ }
+ if (d->applyOrigRight) {
+ if (!d->origRightBinding)
+ d->target->anchors()->resetRight();
+ QDeclarativePropertyPrivate::setBinding(d->rightProp, d->origRightBinding);
+ }
+ if (d->applyOrigHCenter) {
+ if (!d->origHCenterBinding)
+ d->target->anchors()->resetHorizontalCenter();
+ QDeclarativePropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding);
+ }
+ if (d->applyOrigTop) {
+ if (!d->origTopBinding)
+ d->target->anchors()->resetTop();
+ QDeclarativePropertyPrivate::setBinding(d->topProp, d->origTopBinding);
+ }
+ if (d->applyOrigBottom) {
+ if (!d->origBottomBinding)
+ d->target->anchors()->resetBottom();
+ QDeclarativePropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding);
+ }
+ if (d->applyOrigVCenter) {
+ if (!d->origVCenterBinding)
+ d->target->anchors()->resetVerticalCenter();
+ QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding);
+ }
+ if (d->applyOrigBaseline) {
+ if (!d->origBaselineBinding)
+ d->target->anchors()->resetBaseline();
+ QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding);
+ }
+
+ //destroy old bindings
+ if (reason == ActualChange) {
+ for (int i = 0; i < d->oldBindings.size(); ++i) {
+ QDeclarativeAbstractBinding *binding = d->oldBindings.at(i);
+ if (binding)
+ binding->destroy();
+ }
+ d->oldBindings.clear();
+ }
+
+ //reset any anchors that have been specified as "undefined"
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::LeftAnchor) {
d->target->anchors()->resetLeft();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("right")))
+ QDeclarativePropertyPrivate::setBinding(d->leftProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::RightAnchor) {
d->target->anchors()->resetRight();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("horizontalCenter")))
+ QDeclarativePropertyPrivate::setBinding(d->rightProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::HCenterAnchor) {
d->target->anchors()->resetHorizontalCenter();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("top")))
+ QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::TopAnchor) {
d->target->anchors()->resetTop();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("bottom")))
+ QDeclarativePropertyPrivate::setBinding(d->topProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::BottomAnchor) {
d->target->anchors()->resetBottom();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("verticalCenter")))
+ QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::VCenterAnchor) {
d->target->anchors()->resetVerticalCenter();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("baseline")))
+ QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0);
+ }
+ if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::BaselineAnchor) {
d->target->anchors()->resetBaseline();
+ QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0);
+ }
//set any anchors that have been specified
- if (d->anchorSet->d_func()->left.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setLeft(d->anchorSet->d_func()->left);
- if (d->anchorSet->d_func()->right.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setRight(d->anchorSet->d_func()->right);
- if (d->anchorSet->d_func()->hCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setHorizontalCenter(d->anchorSet->d_func()->hCenter);
- if (d->anchorSet->d_func()->top.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setTop(d->anchorSet->d_func()->top);
- if (d->anchorSet->d_func()->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBottom(d->anchorSet->d_func()->bottom);
- if (d->anchorSet->d_func()->vCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setVerticalCenter(d->anchorSet->d_func()->vCenter);
- if (d->anchorSet->d_func()->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBaseline(d->anchorSet->d_func()->baseline);
+ if (d->leftBinding)
+ QDeclarativePropertyPrivate::setBinding(d->leftBinding->property(), d->leftBinding);
+ if (d->rightBinding)
+ QDeclarativePropertyPrivate::setBinding(d->rightBinding->property(), d->rightBinding);
+ if (d->hCenterBinding)
+ QDeclarativePropertyPrivate::setBinding(d->hCenterBinding->property(), d->hCenterBinding);
+ if (d->topBinding)
+ QDeclarativePropertyPrivate::setBinding(d->topBinding->property(), d->topBinding);
+ if (d->bottomBinding)
+ QDeclarativePropertyPrivate::setBinding(d->bottomBinding->property(), d->bottomBinding);
+ if (d->vCenterBinding)
+ QDeclarativePropertyPrivate::setBinding(d->vCenterBinding->property(), d->vCenterBinding);
+ if (d->baselineBinding)
+ QDeclarativePropertyPrivate::setBinding(d->baselineBinding->property(), d->baselineBinding);
}
bool QDeclarativeAnchorChanges::isReversable()
@@ -1012,43 +1148,78 @@ bool QDeclarativeAnchorChanges::isReversable()
return true;
}
-void QDeclarativeAnchorChanges::reverse()
+void QDeclarativeAnchorChanges::reverse(Reason reason)
{
Q_D(QDeclarativeAnchorChanges);
if (!d->target)
return;
//reset any anchors set by the state
- if (d->anchorSet->d_func()->left.anchorLine != QDeclarativeAnchorLine::Invalid)
+ if (d->leftBinding) {
d->target->anchors()->resetLeft();
- if (d->anchorSet->d_func()->right.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->leftBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->leftBinding->destroy(); d->leftBinding = 0;
+ }
+ }
+ if (d->rightBinding) {
d->target->anchors()->resetRight();
- if (d->anchorSet->d_func()->hCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->rightBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->rightBinding->destroy(); d->rightBinding = 0;
+ }
+ }
+ if (d->hCenterBinding) {
d->target->anchors()->resetHorizontalCenter();
- if (d->anchorSet->d_func()->top.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->hCenterBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->hCenterBinding->destroy(); d->hCenterBinding = 0;
+ }
+ }
+ if (d->topBinding) {
d->target->anchors()->resetTop();
- if (d->anchorSet->d_func()->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->topBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->topBinding->destroy(); d->topBinding = 0;
+ }
+ }
+ if (d->bottomBinding) {
d->target->anchors()->resetBottom();
- if (d->anchorSet->d_func()->vCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->bottomBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->bottomBinding->destroy(); d->bottomBinding = 0;
+ }
+ }
+ if (d->vCenterBinding) {
d->target->anchors()->resetVerticalCenter();
- if (d->anchorSet->d_func()->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->vCenterBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->vCenterBinding->destroy(); d->vCenterBinding = 0;
+ }
+ }
+ if (d->baselineBinding) {
d->target->anchors()->resetBaseline();
+ QDeclarativePropertyPrivate::setBinding(d->baselineBinding->property(), 0);
+ if (reason == ActualChange) {
+ d->baselineBinding->destroy(); d->baselineBinding = 0;
+ }
+ }
//restore previous anchors
- if (d->origLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setLeft(d->origLeft);
- if (d->origRight.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setRight(d->origRight);
- if (d->origHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setHorizontalCenter(d->origHCenter);
- if (d->origTop.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setTop(d->origTop);
- if (d->origBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBottom(d->origBottom);
- if (d->origVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setVerticalCenter(d->origVCenter);
- if (d->origBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBaseline(d->origBaseline);
+ if (d->origLeftBinding)
+ QDeclarativePropertyPrivate::setBinding(d->leftProp, d->origLeftBinding);
+ if (d->origRightBinding)
+ QDeclarativePropertyPrivate::setBinding(d->rightProp, d->origRightBinding);
+ if (d->origHCenterBinding)
+ QDeclarativePropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding);
+ if (d->origTopBinding)
+ QDeclarativePropertyPrivate::setBinding(d->topProp, d->origTopBinding);
+ if (d->origBottomBinding)
+ QDeclarativePropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding);
+ if (d->origVCenterBinding)
+ QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding);
+ if (d->origBaselineBinding)
+ QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding);
}
QString QDeclarativeAnchorChanges::typeName() const
@@ -1099,13 +1270,13 @@ void QDeclarativeAnchorChanges::saveOriginals()
if (!d->target)
return;
- d->origLeft = d->target->anchors()->left();
- d->origRight = d->target->anchors()->right();
- d->origHCenter = d->target->anchors()->horizontalCenter();
- d->origTop = d->target->anchors()->top();
- d->origBottom = d->target->anchors()->bottom();
- d->origVCenter = d->target->anchors()->verticalCenter();
- d->origBaseline = d->target->anchors()->baseline();
+ d->origLeftBinding = QDeclarativePropertyPrivate::binding(d->leftProp);
+ d->origRightBinding = QDeclarativePropertyPrivate::binding(d->rightProp);
+ d->origHCenterBinding = QDeclarativePropertyPrivate::binding(d->hCenterProp);
+ d->origTopBinding = QDeclarativePropertyPrivate::binding(d->topProp);
+ d->origBottomBinding = QDeclarativePropertyPrivate::binding(d->bottomProp);
+ d->origVCenterBinding = QDeclarativePropertyPrivate::binding(d->vCenterProp);
+ d->origBaselineBinding = QDeclarativePropertyPrivate::binding(d->baselineProp);
d->applyOrigLeft = d->applyOrigRight = d->applyOrigHCenter = d->applyOrigTop
= d->applyOrigBottom = d->applyOrigVCenter = d->applyOrigBaseline = false;
@@ -1119,35 +1290,29 @@ void QDeclarativeAnchorChanges::copyOriginals(QDeclarativeActionEvent *other)
QDeclarativeAnchorChanges *ac = static_cast<QDeclarativeAnchorChanges*>(other);
QDeclarativeAnchorChangesPrivate *acp = ac->d_func();
- //probably also need to revert some things
- d->applyOrigLeft = (acp->anchorSet->d_func()->left.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("left")));
-
- d->applyOrigRight = (acp->anchorSet->d_func()->right.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("right")));
-
- d->applyOrigHCenter = (acp->anchorSet->d_func()->hCenter.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("horizontalCenter")));
-
- d->applyOrigTop = (acp->anchorSet->d_func()->top.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("top")));
-
- d->applyOrigBottom = (acp->anchorSet->d_func()->bottom.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("bottom")));
+ QDeclarativeAnchors::Anchors combined = acp->anchorSet->d_func()->usedAnchors |
+ acp->anchorSet->d_func()->resetAnchors;
- d->applyOrigVCenter = (acp->anchorSet->d_func()->vCenter.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("verticalCenter")));
-
- d->applyOrigBaseline = (acp->anchorSet->d_func()->baseline.anchorLine != QDeclarativeAnchorLine::Invalid ||
- acp->anchorSet->d_func()->resetList.contains(QLatin1String("baseline")));
-
- d->origLeft = ac->d_func()->origLeft;
- d->origRight = ac->d_func()->origRight;
- d->origHCenter = ac->d_func()->origHCenter;
- d->origTop = ac->d_func()->origTop;
- d->origBottom = ac->d_func()->origBottom;
- d->origVCenter = ac->d_func()->origVCenter;
- d->origBaseline = ac->d_func()->origBaseline;
+ //probably also need to revert some things
+ d->applyOrigLeft = (combined & QDeclarativeAnchors::LeftAnchor);
+ d->applyOrigRight = (combined & QDeclarativeAnchors::RightAnchor);
+ d->applyOrigHCenter = (combined & QDeclarativeAnchors::HCenterAnchor);
+ d->applyOrigTop = (combined & QDeclarativeAnchors::TopAnchor);
+ d->applyOrigBottom = (combined & QDeclarativeAnchors::BottomAnchor);
+ d->applyOrigVCenter = (combined & QDeclarativeAnchors::VCenterAnchor);
+ d->applyOrigBaseline = (combined & QDeclarativeAnchors::BaselineAnchor);
+
+ d->origLeftBinding = acp->origLeftBinding;
+ d->origRightBinding = acp->origRightBinding;
+ d->origHCenterBinding = acp->origHCenterBinding;
+ d->origTopBinding = acp->origTopBinding;
+ d->origBottomBinding = acp->origBottomBinding;
+ d->origVCenterBinding = acp->origVCenterBinding;
+ d->origBaselineBinding = acp->origBaselineBinding;
+
+ d->oldBindings.clear();
+ d->oldBindings << acp->leftBinding << acp->rightBinding << acp->hCenterBinding
+ << acp->topBinding << acp->bottomBinding << acp->baselineBinding;
saveCurrentValues();
}
@@ -1164,52 +1329,38 @@ void QDeclarativeAnchorChanges::clearBindings()
d->fromHeight = d->target->height();
//reset any anchors with corresponding reverts
- if (d->applyOrigLeft)
- d->target->anchors()->resetLeft();
- if (d->applyOrigRight)
- d->target->anchors()->resetRight();
- if (d->applyOrigHCenter)
- d->target->anchors()->resetHorizontalCenter();
- if (d->applyOrigTop)
- d->target->anchors()->resetTop();
- if (d->applyOrigBottom)
- d->target->anchors()->resetBottom();
- if (d->applyOrigVCenter)
- d->target->anchors()->resetVerticalCenter();
- if (d->applyOrigBaseline)
- d->target->anchors()->resetBaseline();
-
- //reset any anchors that have been specified
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("left")))
- d->target->anchors()->resetLeft();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("right")))
- d->target->anchors()->resetRight();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("horizontalCenter")))
- d->target->anchors()->resetHorizontalCenter();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("top")))
- d->target->anchors()->resetTop();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("bottom")))
- d->target->anchors()->resetBottom();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("verticalCenter")))
- d->target->anchors()->resetVerticalCenter();
- if (d->anchorSet->d_func()->resetList .contains(QLatin1String("baseline")))
- d->target->anchors()->resetBaseline();
-
+ //reset any anchors that have been specified as "undefined"
//reset any anchors that we'll be setting in the state
- if (d->anchorSet->d_func()->left.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativeAnchors::Anchors combined = d->anchorSet->d_func()->resetAnchors |
+ d->anchorSet->d_func()->usedAnchors;
+ if (d->applyOrigLeft || (combined & QDeclarativeAnchors::LeftAnchor)) {
d->target->anchors()->resetLeft();
- if (d->anchorSet->d_func()->right.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->leftProp, 0);
+ }
+ if (d->applyOrigRight || (combined & QDeclarativeAnchors::RightAnchor)) {
d->target->anchors()->resetRight();
- if (d->anchorSet->d_func()->hCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->rightProp, 0);
+ }
+ if (d->applyOrigHCenter || (combined & QDeclarativeAnchors::HCenterAnchor)) {
d->target->anchors()->resetHorizontalCenter();
- if (d->anchorSet->d_func()->top.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0);
+ }
+ if (d->applyOrigTop || (combined & QDeclarativeAnchors::TopAnchor)) {
d->target->anchors()->resetTop();
- if (d->anchorSet->d_func()->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->topProp, 0);
+ }
+ if (d->applyOrigBottom || (combined & QDeclarativeAnchors::BottomAnchor)) {
d->target->anchors()->resetBottom();
- if (d->anchorSet->d_func()->vCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0);
+ }
+ if (d->applyOrigVCenter || (combined & QDeclarativeAnchors::VCenterAnchor)) {
d->target->anchors()->resetVerticalCenter();
- if (d->anchorSet->d_func()->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0);
+ }
+ if (d->applyOrigBaseline || (combined & QDeclarativeAnchors::BaselineAnchor)) {
d->target->anchors()->resetBaseline();
+ QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0);
+ }
}
bool QDeclarativeAnchorChanges::override(QDeclarativeActionEvent*other)
diff --git a/src/declarative/util/qdeclarativestateoperations_p.h b/src/declarative/util/qdeclarativestateoperations_p.h
index d49ec63..e22c1e2 100644
--- a/src/declarative/util/qdeclarativestateoperations_p.h
+++ b/src/declarative/util/qdeclarativestateoperations_p.h
@@ -108,9 +108,9 @@ public:
virtual void saveOriginals();
virtual void copyOriginals(QDeclarativeActionEvent*);
- virtual void execute();
+ virtual void execute(Reason reason = ActualChange);
virtual bool isReversable();
- virtual void reverse();
+ virtual void reverse(Reason reason = ActualChange);
virtual QString typeName() const;
virtual bool override(QDeclarativeActionEvent*other);
virtual void rewind();
@@ -140,7 +140,7 @@ public:
QString name() const;
void setName(const QString &);
- virtual void execute();
+ virtual void execute(Reason reason = ActualChange);
};
class QDeclarativeAnchorChanges;
@@ -149,13 +149,13 @@ class Q_AUTOTEST_EXPORT QDeclarativeAnchorSet : public QObject
{
Q_OBJECT
- Q_PROPERTY(QDeclarativeAnchorLine left READ left WRITE setLeft RESET resetLeft)
- Q_PROPERTY(QDeclarativeAnchorLine right READ right WRITE setRight RESET resetRight)
- Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter)
- Q_PROPERTY(QDeclarativeAnchorLine top READ top WRITE setTop RESET resetTop)
- Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom)
- Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter)
- Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline)
+ Q_PROPERTY(QDeclarativeScriptString left READ left WRITE setLeft RESET resetLeft)
+ Q_PROPERTY(QDeclarativeScriptString right READ right WRITE setRight RESET resetRight)
+ Q_PROPERTY(QDeclarativeScriptString horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter)
+ Q_PROPERTY(QDeclarativeScriptString top READ top WRITE setTop RESET resetTop)
+ Q_PROPERTY(QDeclarativeScriptString bottom READ bottom WRITE setBottom RESET resetBottom)
+ Q_PROPERTY(QDeclarativeScriptString verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter)
+ Q_PROPERTY(QDeclarativeScriptString baseline READ baseline WRITE setBaseline RESET resetBaseline)
//Q_PROPERTY(QDeclarativeItem *fill READ fill WRITE setFill RESET resetFill)
//Q_PROPERTY(QDeclarativeItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn)
@@ -172,32 +172,32 @@ public:
QDeclarativeAnchorSet(QObject *parent=0);
virtual ~QDeclarativeAnchorSet();
- QDeclarativeAnchorLine left() const;
- void setLeft(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString left() const;
+ void setLeft(const QDeclarativeScriptString &edge);
void resetLeft();
- QDeclarativeAnchorLine right() const;
- void setRight(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString right() const;
+ void setRight(const QDeclarativeScriptString &edge);
void resetRight();
- QDeclarativeAnchorLine horizontalCenter() const;
- void setHorizontalCenter(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString horizontalCenter() const;
+ void setHorizontalCenter(const QDeclarativeScriptString &edge);
void resetHorizontalCenter();
- QDeclarativeAnchorLine top() const;
- void setTop(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString top() const;
+ void setTop(const QDeclarativeScriptString &edge);
void resetTop();
- QDeclarativeAnchorLine bottom() const;
- void setBottom(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString bottom() const;
+ void setBottom(const QDeclarativeScriptString &edge);
void resetBottom();
- QDeclarativeAnchorLine verticalCenter() const;
- void setVerticalCenter(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString verticalCenter() const;
+ void setVerticalCenter(const QDeclarativeScriptString &edge);
void resetVerticalCenter();
- QDeclarativeAnchorLine baseline() const;
- void setBaseline(const QDeclarativeAnchorLine &edge);
+ QDeclarativeScriptString baseline() const;
+ void setBaseline(const QDeclarativeScriptString &edge);
void resetBaseline();
QDeclarativeItem *fill() const;
@@ -232,7 +232,7 @@ public:
qreal baselineOffset() const;
void setBaselineOffset(qreal);*/
- QDeclarativeAnchors::UsedAnchors usedAnchors() const;
+ QDeclarativeAnchors::Anchors usedAnchors() const;
/*Q_SIGNALS:
void leftMarginChanged();
@@ -270,9 +270,9 @@ public:
QDeclarativeItem *object() const;
void setObject(QDeclarativeItem *);
- virtual void execute();
+ virtual void execute(Reason reason = ActualChange);
virtual bool isReversable();
- virtual void reverse();
+ virtual void reverse(Reason reason = ActualChange);
virtual QString typeName() const;
virtual bool override(QDeclarativeActionEvent*other);
virtual bool changesBindings();
diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h
index d1e6630..08c3d4e 100644
--- a/src/declarative/util/qdeclarativetimer_p.h
+++ b/src/declarative/util/qdeclarativetimer_p.h
@@ -63,6 +63,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarati
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
Q_PROPERTY(bool repeat READ isRepeating WRITE setRepeating NOTIFY repeatChanged)
Q_PROPERTY(bool triggeredOnStart READ triggeredOnStart WRITE setTriggeredOnStart NOTIFY triggeredOnStartChanged)
+ Q_PROPERTY(QObject *parent READ parent CONSTANT)
public:
QDeclarativeTimer(QObject *parent=0);
diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp
index bc40377..368d484 100644
--- a/src/declarative/util/qdeclarativetransitionmanager.cpp
+++ b/src/declarative/util/qdeclarativetransitionmanager.cpp
@@ -42,6 +42,7 @@
#include "private/qdeclarativetransitionmanager_p_p.h"
#include "private/qdeclarativestate_p_p.h"
+#include "private/qdeclarativestate_p.h"
#include <qdeclarativebinding_p.h>
#include <qdeclarativeglobal_p.h>
@@ -150,9 +151,9 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> &
QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
} else if (action.event->isReversable()) {
if (action.reverseEvent)
- action.event->reverse();
+ action.event->reverse(QDeclarativeActionEvent::FastForward);
else
- action.event->execute();
+ action.event->execute(QDeclarativeActionEvent::FastForward);
}
}
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index b9f1abb..eb59fb1 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -68,56 +68,60 @@
#include "private/qdeclarativetransitionmanager_p_p.h"
#include "private/qdeclarativetransition_p.h"
#include "qdeclarativeview.h"
+#include "qdeclarativeinfo.h"
+#include "private/qdeclarativetypenotavailable_p.h"
#ifndef QT_NO_XMLPATTERNS
#include "private/qdeclarativexmllistmodel_p.h"
#endif
void QDeclarativeUtilModule::defineModule()
{
- qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,6,"AnchorAnimation");
- qmlRegisterType<QDeclarativeAnchorChanges>("Qt",4,6,"AnchorChanges");
- qmlRegisterType<QDeclarativeBehavior>("Qt",4,6,"Behavior");
- qmlRegisterType<QDeclarativeBind>("Qt",4,6,"Binding");
- qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,6,"ColorAnimation");
- qmlRegisterType<QDeclarativeConnections>("Qt",4,6,"Connections");
- qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,6,"SmoothedAnimation");
- qmlRegisterType<QDeclarativeSmoothedFollow>("Qt",4,6,"SmoothedFollow");
- qmlRegisterType<QDeclarativeFontLoader>("Qt",4,6,"FontLoader");
- qmlRegisterType<QDeclarativeListElement>("Qt",4,6,"ListElement");
- qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,6,"NumberAnimation");
- qmlRegisterType<QDeclarativePackage>("Qt",4,6,"Package");
- qmlRegisterType<QDeclarativeParallelAnimation>("Qt",4,6,"ParallelAnimation");
- qmlRegisterType<QDeclarativeParentAnimation>("Qt",4,6,"ParentAnimation");
- qmlRegisterType<QDeclarativeParentChange>("Qt",4,6,"ParentChange");
- qmlRegisterType<QDeclarativePauseAnimation>("Qt",4,6,"PauseAnimation");
- qmlRegisterType<QDeclarativePropertyAction>("Qt",4,6,"PropertyAction");
- qmlRegisterType<QDeclarativePropertyAnimation>("Qt",4,6,"PropertyAnimation");
- qmlRegisterType<QDeclarativeRotationAnimation>("Qt",4,6,"RotationAnimation");
- qmlRegisterType<QDeclarativeScriptAction>("Qt",4,6,"ScriptAction");
- qmlRegisterType<QDeclarativeSequentialAnimation>("Qt",4,6,"SequentialAnimation");
- qmlRegisterType<QDeclarativeSpringFollow>("Qt",4,6,"SpringFollow");
- qmlRegisterType<QDeclarativeStateChangeScript>("Qt",4,6,"StateChangeScript");
- qmlRegisterType<QDeclarativeStateGroup>("Qt",4,6,"StateGroup");
- qmlRegisterType<QDeclarativeState>("Qt",4,6,"State");
- qmlRegisterType<QDeclarativeSystemPalette>("Qt",4,6,"SystemPalette");
- qmlRegisterType<QDeclarativeTimer>("Qt",4,6,"Timer");
- qmlRegisterType<QDeclarativeTransition>("Qt",4,6,"Transition");
- qmlRegisterType<QDeclarativeVector3dAnimation>("Qt",4,6,"Vector3dAnimation");
-#ifndef QT_NO_XMLPATTERNS
- qmlRegisterType<QDeclarativeXmlListModel>("Qt",4,6,"XmlListModel");
- qmlRegisterType<QDeclarativeXmlListModelRole>("Qt",4,6,"XmlRole");
+ qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,7,"AnchorAnimation");
+ qmlRegisterType<QDeclarativeAnchorChanges>("Qt",4,7,"AnchorChanges");
+ qmlRegisterType<QDeclarativeBehavior>("Qt",4,7,"Behavior");
+ qmlRegisterType<QDeclarativeBind>("Qt",4,7,"Binding");
+ qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,7,"ColorAnimation");
+ qmlRegisterType<QDeclarativeConnections>("Qt",4,7,"Connections");
+ qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,7,"SmoothedAnimation");
+ qmlRegisterType<QDeclarativeSmoothedFollow>("Qt",4,7,"SmoothedFollow");
+ qmlRegisterType<QDeclarativeFontLoader>("Qt",4,7,"FontLoader");
+ qmlRegisterType<QDeclarativeListElement>("Qt",4,7,"ListElement");
+ qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,7,"NumberAnimation");
+ qmlRegisterType<QDeclarativePackage>("Qt",4,7,"Package");
+ qmlRegisterType<QDeclarativeParallelAnimation>("Qt",4,7,"ParallelAnimation");
+ qmlRegisterType<QDeclarativeParentAnimation>("Qt",4,7,"ParentAnimation");
+ qmlRegisterType<QDeclarativeParentChange>("Qt",4,7,"ParentChange");
+ qmlRegisterType<QDeclarativePauseAnimation>("Qt",4,7,"PauseAnimation");
+ qmlRegisterType<QDeclarativePropertyAction>("Qt",4,7,"PropertyAction");
+ qmlRegisterType<QDeclarativePropertyAnimation>("Qt",4,7,"PropertyAnimation");
+ qmlRegisterType<QDeclarativeRotationAnimation>("Qt",4,7,"RotationAnimation");
+ qmlRegisterType<QDeclarativeScriptAction>("Qt",4,7,"ScriptAction");
+ qmlRegisterType<QDeclarativeSequentialAnimation>("Qt",4,7,"SequentialAnimation");
+ qmlRegisterType<QDeclarativeSpringFollow>("Qt",4,7,"SpringFollow");
+ qmlRegisterType<QDeclarativeStateChangeScript>("Qt",4,7,"StateChangeScript");
+ qmlRegisterType<QDeclarativeStateGroup>("Qt",4,7,"StateGroup");
+ qmlRegisterType<QDeclarativeState>("Qt",4,7,"State");
+ qmlRegisterType<QDeclarativeSystemPalette>("Qt",4,7,"SystemPalette");
+ qmlRegisterType<QDeclarativeTimer>("Qt",4,7,"Timer");
+ qmlRegisterType<QDeclarativeTransition>("Qt",4,7,"Transition");
+ qmlRegisterType<QDeclarativeVector3dAnimation>("Qt",4,7,"Vector3dAnimation");
+#ifdef QT_NO_XMLPATTERNS
+ qmlRegisterTypeNotAvailable("Qt",4,7,"XmlListModel",
+ qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
+ qmlRegisterTypeNotAvailable("Qt",4,7,"XmlRole",
+ qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
+#else
+ qmlRegisterType<QDeclarativeXmlListModel>("Qt",4,7,"XmlListModel");
+ qmlRegisterType<QDeclarativeXmlListModelRole>("Qt",4,7,"XmlRole");
#endif
qmlRegisterType<QDeclarativeAnchors>();
qmlRegisterType<QDeclarativeStateOperation>();
qmlRegisterType<QDeclarativeAnchorSet>();
- qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,6,"Animation");
+ qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,7,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class"));
- qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,6, "ListModel", "QDeclarativeListModel",
- new QDeclarativeListModelParser);
- qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 6, "PropertyChanges", "QDeclarativePropertyChanges",
- new QDeclarativePropertyChangesParser);
- qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 6, "Connections", "QDeclarativeConnections",
- new QDeclarativeConnectionsParser);
+ qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,7, "ListModel", new QDeclarativeListModelParser);
+ qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 6, "PropertyChanges", new QDeclarativePropertyChangesParser);
+ qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 6, "Connections", new QDeclarativeConnectionsParser);
}
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index c0425ef..62d913c 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -59,10 +59,14 @@
#include <qfontdatabase.h>
#include <qicon.h>
#include <qurl.h>
-#include <qboxlayout.h>
+#include <qlayout.h>
+#include <qwidget.h>
+#include <qgraphicswidget.h>
#include <qbasictimer.h>
#include <QtCore/qabstractanimation.h>
#include <private/qgraphicsview_p.h>
+#include <private/qdeclarativeitem_p.h>
+#include <private/qdeclarativeitemchangelistener_p.h>
QT_BEGIN_NAMESPACE
@@ -124,19 +128,23 @@ void FrameBreakAnimation::updateCurrentTime(int msecs)
server->frameBreak();
}
-class QDeclarativeViewPrivate
+class QDeclarativeViewPrivate : public QDeclarativeItemChangeListener
{
public:
QDeclarativeViewPrivate(QDeclarativeView *view)
- : q(view), root(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
+ : q(view), root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
~QDeclarativeViewPrivate() { delete root; }
-
void execute();
+ void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
+ void initResize();
+ void updateSize();
+ inline QSize rootObjectSize();
QDeclarativeView *q;
QDeclarativeGuard<QGraphicsObject> root;
- QDeclarativeGuard<QDeclarativeItem> qmlRoot;
+ QDeclarativeGuard<QDeclarativeItem> declarativeItemRoot;
+ QDeclarativeGuard<QGraphicsWidget> graphicsWidgetRoot;
QUrl source;
@@ -144,7 +152,6 @@ public:
QDeclarativeComponent *component;
QBasicTimer resizetimer;
- mutable QSize initialSize;
QDeclarativeView::ResizeMode resizeMode;
QTime frameTimer;
@@ -155,18 +162,32 @@ public:
void QDeclarativeViewPrivate::execute()
{
- delete root;
- delete component;
- initialSize = QSize();
- component = new QDeclarativeComponent(&engine, source, q);
-
- if (!component->isLoading()) {
- q->continueExecute();
- } else {
- QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), q, SLOT(continueExecute()));
+ if (root) {
+ delete root;
+ root = 0;
+ }
+ if (component) {
+ delete component;
+ component = 0;
+ }
+ if (!source.isEmpty()) {
+ component = new QDeclarativeComponent(&engine, source, q);
+ if (!component->isLoading()) {
+ q->continueExecute();
+ } else {
+ QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), q, SLOT(continueExecute()));
+ }
}
}
+void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ if (resizeItem == root && resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ // wait for both width and height to be changed
+ resizetimer.start(0,q);
+ }
+ QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry);
+}
/*!
\class QDeclarativeView
@@ -332,21 +353,20 @@ QDeclarativeContext* QDeclarativeView::rootContext()
/*!
\enum QDeclarativeView::Status
-
Specifies the loading status of the QDeclarativeView.
\value Null This QDeclarativeView has no source set.
\value Ready This QDeclarativeView has loaded and created the QML component.
\value Loading This QDeclarativeView is loading network data.
- \value Error An error has occured. Calling errorDescription() to retrieve a description.
+ \value Error An error has occured. Call errorDescription() to retrieve a description.
*/
/*! \enum QDeclarativeView::ResizeMode
This enum specifies how to resize the view.
- \value SizeViewToRootObject
- \value SizeRootObjectToView
+ \value SizeViewToRootObject The view resizes with the root item in the QML.
+ \value SizeRootObjectToView The view will automatically resize the root item to the size of the view.
*/
/*!
@@ -373,7 +393,6 @@ QList<QDeclarativeError> QDeclarativeView::errors() const
return QList<QDeclarativeError>();
}
-
/*!
\property QDeclarativeView::resizeMode
\brief whether the view should resize the canvas contents
@@ -394,16 +413,92 @@ void QDeclarativeView::setResizeMode(ResizeMode mode)
if (d->resizeMode == mode)
return;
+ if (d->declarativeItemRoot) {
+ if (d->resizeMode == SizeViewToRootObject) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(d->declarativeItemRoot));
+ p->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
+ }
+ } else if (d->graphicsWidgetRoot) {
+ if (d->resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ d->graphicsWidgetRoot->removeEventFilter(this);
+ }
+ }
+
d->resizeMode = mode;
- if (d->qmlRoot) {
- if (d->resizeMode == SizeRootObjectToView) {
- d->qmlRoot->setWidth(width());
- d->qmlRoot->setHeight(height());
- } else {
- d->qmlRoot->setWidth(d->initialSize.width());
- d->qmlRoot->setHeight(d->initialSize.height());
+ if (d->root) {
+ d->initResize();
+ }
+}
+
+void QDeclarativeViewPrivate::initResize()
+{
+ if (declarativeItemRoot) {
+ if (resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(declarativeItemRoot));
+ p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ }
+ } else if (graphicsWidgetRoot) {
+ if (resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ graphicsWidgetRoot->installEventFilter(q);
+ }
+ }
+ updateSize();
+}
+
+void QDeclarativeViewPrivate::updateSize()
+{
+ if (!root)
+ return;
+ if (declarativeItemRoot) {
+ if (resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ QSize newSize = QSize(declarativeItemRoot->width(), declarativeItemRoot->height());
+ if (newSize.isValid() && newSize != q->size()) {
+ q->resize(newSize);
+ }
+ } else if (resizeMode == QDeclarativeView::SizeRootObjectToView) {
+ if (!qFuzzyCompare(q->width(), declarativeItemRoot->width()))
+ declarativeItemRoot->setWidth(q->width());
+ if (!qFuzzyCompare(q->height(), declarativeItemRoot->height()))
+ declarativeItemRoot->setHeight(q->height());
}
+ } else if (graphicsWidgetRoot) {
+ if (resizeMode == QDeclarativeView::SizeViewToRootObject) {
+ QSize newSize = QSize(graphicsWidgetRoot->size().width(), graphicsWidgetRoot->size().height());
+ if (newSize.isValid() && newSize != q->size()) {
+ q->resize(newSize);
+ }
+ } else if (resizeMode == QDeclarativeView::SizeRootObjectToView) {
+ QSizeF newSize = QSize(q->size().width(), q->size().height());
+ if (newSize.isValid() && newSize != graphicsWidgetRoot->size()) {
+ graphicsWidgetRoot->resize(newSize);
+ }
+ }
+ }
+ q->updateGeometry();
+}
+
+QSize QDeclarativeViewPrivate::rootObjectSize()
+{
+ QSize rootObjectSize(0,0);
+ int widthCandidate = -1;
+ int heightCandidate = -1;
+ if (declarativeItemRoot) {
+ widthCandidate = declarativeItemRoot->width();
+ heightCandidate = declarativeItemRoot->height();
+ } else if (root) {
+ QSizeF size = root->boundingRect().size();
+ widthCandidate = size.width();
+ heightCandidate = size.height();
+ }
+ if (widthCandidate > 0) {
+ rootObjectSize.setWidth(widthCandidate);
}
+ if (heightCandidate > 0) {
+ rootObjectSize.setHeight(heightCandidate);
+ }
+ return rootObjectSize;
}
QDeclarativeView::ResizeMode QDeclarativeView::resizeMode() const
@@ -449,55 +544,46 @@ void QDeclarativeView::continueExecute()
*/
void QDeclarativeView::setRootObject(QObject *obj)
{
- if (QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(obj)) {
- d->scene.addItem(item);
-
- d->root = item;
- d->qmlRoot = item;
- connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged()));
- connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged()));
- if (d->initialSize.height() <= 0 && d->qmlRoot->width() > 0)
- d->initialSize.setWidth(d->qmlRoot->width());
- if (d->initialSize.height() <= 0 && d->qmlRoot->height() > 0)
- d->initialSize.setHeight(d->qmlRoot->height());
- resize(d->initialSize);
-
- if (d->resizeMode == SizeRootObjectToView) {
- d->qmlRoot->setWidth(width());
- d->qmlRoot->setHeight(height());
+ if (d->root == obj)
+ return;
+ if (QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem *>(obj)) {
+ d->scene.addItem(declarativeItem);
+ d->root = declarativeItem;
+ d->declarativeItemRoot = declarativeItem;
+ } else if (QGraphicsObject *graphicsObject = qobject_cast<QGraphicsObject *>(obj)) {
+ d->scene.addItem(graphicsObject);
+ d->root = graphicsObject;
+ if (graphicsObject->isWidget()) {
+ d->graphicsWidgetRoot = static_cast<QGraphicsWidget*>(graphicsObject);
} else {
- QSize sz(d->qmlRoot->width(),d->qmlRoot->height());
- emit sceneResized(sz);
- resize(sz);
+ qWarning() << "QDeclarativeView::resizeMode is not honored for components of type QGraphicsObject";
}
- updateGeometry();
- } else if (QGraphicsObject *item = qobject_cast<QGraphicsObject *>(obj)) {
- d->scene.addItem(item);
- qWarning() << "QDeclarativeView::resizeMode is not honored for components of type QGraphicsObject";
- } else if (QWidget *wid = qobject_cast<QWidget *>(obj)) {
- window()->setAttribute(Qt::WA_OpaquePaintEvent, false);
- window()->setAttribute(Qt::WA_NoSystemBackground, false);
- if (!layout()) {
- setLayout(new QVBoxLayout);
- layout()->setContentsMargins(0, 0, 0, 0);
- } else if (layout()->count()) {
- // Hide the QGraphicsView in GV mode.
- QLayoutItem *item = layout()->itemAt(0);
- if (item->widget())
- item->widget()->hide();
+ } else if (obj) {
+ qWarning() << "QDeclarativeView only supports loading of root objects that derive from QGraphicsObject";
+ if (QWidget* widget = qobject_cast<QWidget *>(obj)) {
+ window()->setAttribute(Qt::WA_OpaquePaintEvent, false);
+ window()->setAttribute(Qt::WA_NoSystemBackground, false);
+ if (layout() && layout()->count()) {
+ // Hide the QGraphicsView in GV mode.
+ QLayoutItem *item = layout()->itemAt(0);
+ if (item->widget())
+ item->widget()->hide();
+ }
+ widget->setParent(this);
+ if (isVisible()) {
+ widget->setVisible(true);
+ }
+ resize(widget->size());
}
- layout()->addWidget(wid);
- emit sceneResized(wid->size());
}
-}
-/*!
- \internal
- */
-void QDeclarativeView::sizeChanged()
-{
- // delay, so we catch both width and height changing.
- d->resizetimer.start(0,this);
+ if (d->root) {
+ QSize initialSize = d->rootObjectSize();
+ if (initialSize != size()) {
+ resize(initialSize);
+ }
+ d->initResize();
+ }
}
/*!
@@ -508,30 +594,37 @@ void QDeclarativeView::sizeChanged()
void QDeclarativeView::timerEvent(QTimerEvent* e)
{
if (!e || e->timerId() == d->resizetimer.timerId()) {
- if (d->qmlRoot) {
- QSize sz(d->qmlRoot->width(),d->qmlRoot->height());
- emit sceneResized(sz);
- //if (!d->resizable)
- //resize(sz);
- }
+ d->updateSize();
d->resizetimer.stop();
- updateGeometry();
}
}
+/*! \reimp */
+bool QDeclarativeView::eventFilter(QObject *watched, QEvent *e)
+{
+ if (watched == d->root && d->resizeMode == SizeViewToRootObject) {
+ if (d->graphicsWidgetRoot) {
+ if (e->type() == QEvent::GraphicsSceneResize) {
+ d->updateSize();
+ }
+ }
+ }
+ return QGraphicsView::eventFilter(watched, e);
+}
+
/*!
\internal
- The size hint is the size of the root item.
+ Preferred size follows the root object in
+ resize mode SizeViewToRootObject and
+ the view in resize mode SizeRootObjectToView.
*/
QSize QDeclarativeView::sizeHint() const
{
- if (d->qmlRoot) {
- if (d->initialSize.width() <= 0)
- d->initialSize.setWidth(d->qmlRoot->width());
- if (d->initialSize.height() <= 0)
- d->initialSize.setHeight(d->qmlRoot->height());
+ if (d->resizeMode == SizeRootObjectToView) {
+ return size();
+ } else { // d->resizeMode == SizeViewToRootObject
+ return d->rootObjectSize();
}
- return d->initialSize;
}
/*!
@@ -549,17 +642,17 @@ QGraphicsObject *QDeclarativeView::rootObject() const
*/
void QDeclarativeView::resizeEvent(QResizeEvent *e)
{
- if (d->resizeMode == SizeRootObjectToView && d->qmlRoot) {
- d->qmlRoot->setWidth(width());
- d->qmlRoot->setHeight(height());
+ if (d->resizeMode == SizeRootObjectToView) {
+ d->updateSize();
}
- if (d->qmlRoot) {
- setSceneRect(QRectF(0, 0, d->qmlRoot->width(), d->qmlRoot->height()));
+ if (d->declarativeItemRoot) {
+ setSceneRect(QRectF(0, 0, d->declarativeItemRoot->width(), d->declarativeItemRoot->height()));
} else if (d->root) {
setSceneRect(d->root->boundingRect());
} else {
setSceneRect(rect());
}
+ emit sceneResized(e->size());
QGraphicsView::resizeEvent(e);
}
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index 107f3f9..1807758 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -97,13 +97,13 @@ Q_SIGNALS:
private Q_SLOTS:
void continueExecute();
- void sizeChanged();
protected:
virtual void resizeEvent(QResizeEvent *);
virtual void paintEvent(QPaintEvent *event);
virtual void timerEvent(QTimerEvent*);
virtual void setRootObject(QObject *obj);
+ virtual bool eventFilter(QObject *watched, QEvent *e);
friend class QDeclarativeViewPrivate;
QDeclarativeViewPrivate *d;
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 7f8b962..55e768e 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -667,7 +667,7 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati
}
/*!
- \qmlproperty enum XmlListModel::status
+ \qmlproperty enumeration XmlListModel::status
Specifies the model loading status, which can be one of the following:
\list
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 20ea262..6cc3f7d 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1237,6 +1237,8 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
}
dirtySceneTransform = 1;
+ if (!inDestructor && (transformData || (newParent && newParent->d_ptr->transformData)))
+ transformChanged();
// Restore the sub focus chain.
if (subFocusItem) {
@@ -3622,6 +3624,7 @@ void QGraphicsItemPrivate::setTransformHelper(const QTransform &transform)
q_ptr->prepareGeometryChange();
transformData->transform = transform;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
@@ -3812,6 +3815,8 @@ void QGraphicsItem::setRotation(qreal angle)
if (d_ptr->isObject)
emit static_cast<QGraphicsObject *>(this)->rotationChanged();
+
+ d_ptr->transformChanged();
}
/*!
@@ -3876,6 +3881,8 @@ void QGraphicsItem::setScale(qreal factor)
if (d_ptr->isObject)
emit static_cast<QGraphicsObject *>(this)->scaleChanged();
+
+ d_ptr->transformChanged();
}
@@ -3931,6 +3938,7 @@ void QGraphicsItem::setTransformations(const QList<QGraphicsTransform *> &transf
transformations.at(i)->d_func()->setItem(this);
d_ptr->transformData->onlyTransform = false;
d_ptr->dirtySceneTransform = 1;
+ d_ptr->transformChanged();
}
/*!
@@ -3947,6 +3955,7 @@ void QGraphicsItemPrivate::prependGraphicsTransform(QGraphicsTransform *t)
t->d_func()->setItem(q);
transformData->onlyTransform = false;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
@@ -3963,6 +3972,7 @@ void QGraphicsItemPrivate::appendGraphicsTransform(QGraphicsTransform *t)
t->d_func()->setItem(q);
transformData->onlyTransform = false;
dirtySceneTransform = 1;
+ transformChanged();
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index f922842..8c7fbb4 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -284,6 +284,7 @@ public:
void setEnabledHelper(bool newEnabled, bool explicitly, bool update = true);
bool discardUpdateRequest(bool ignoreVisibleBit = false,
bool ignoreDirtyBit = false, bool ignoreOpacity = false) const;
+ virtual void transformChanged() {}
int depth() const;
#ifndef QT_NO_GRAPHICSEFFECT
enum InvalidateReason {
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 42df800..d027b91 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1350,6 +1350,7 @@ bool QLineControl::processEvent(QEvent* ev)
#endif
switch(ev->type()){
#ifndef QT_NO_GRAPHICSVIEW
+ case QEvent::GraphicsSceneMouseDoubleClick:
case QEvent::GraphicsSceneMouseMove:
case QEvent::GraphicsSceneMouseRelease:
case QEvent::GraphicsSceneMousePress:{
@@ -1439,6 +1440,7 @@ void QLineControl::processMouseEvent(QMouseEvent* ev)
moveCursor(cursor, mark);
break;
}
+ case QEvent::GraphicsSceneMouseDoubleClick:
case QEvent::MouseButtonDblClick:
if (ev->button() == Qt::LeftButton) {
selectWordAtPos(xToPos(ev->pos().x()));
diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro
index b9c5b4e..f55c00e 100644
--- a/src/imports/gestures/gestures.pro
+++ b/src/imports/gestures/gestures.pro
@@ -17,8 +17,7 @@ symbian:{
load(data_caging_paths)
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = gesturesqmlplugin.dll \
- qmldir
+ importFiles.sources = gesturesqmlplugin.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
index 92f7ec4..c366e54 100644
--- a/src/imports/multimedia/multimedia.pro
+++ b/src/imports/multimedia/multimedia.pro
@@ -27,8 +27,7 @@ symbian:{
load(data_caging_paths)
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/multimedia.dll \
- qmldir
+ importFiles.sources = multimedia.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
index 82d5d89..849c51d 100644
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -195,7 +195,7 @@ void QDeclarativeAudio::stop()
*/
/*!
- \qmlproperty enum Audio::status
+ \qmlproperty enumeration Audio::status
This property holds the status of media loading. It can be one of:
@@ -263,7 +263,7 @@ QDeclarativeAudio::Status QDeclarativeAudio::status() const
*/
/*!
- \qmlproperty qreal Audio::volume
+ \qmlproperty real Audio::volume
This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
*/
@@ -275,7 +275,7 @@ QDeclarativeAudio::Status QDeclarativeAudio::status() const
*/
/*!
- \qmlproperty qreal Audio::bufferProgress
+ \qmlproperty real Audio::bufferProgress
This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
(full).
@@ -290,13 +290,13 @@ QDeclarativeAudio::Status QDeclarativeAudio::status() const
*/
/*!
- \qmlproperty qreal Audio::playbackRate
+ \qmlproperty real Audio::playbackRate
This property holds the rate at which audio is played at as a multiple of the normal rate.
*/
/*!
- \qmlproperty enum Audio::error
+ \qmlproperty enumeration Audio::error
This property holds the error state of the audio. It can be one of:
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
index c6ae272..d84d304 100644
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -82,11 +82,11 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
Video { source: "video/movie.mpg" }
\endqml
- The video item supports untransformed, stretched, and uniformly scaled video presentation.
+ The Video item supports untransformed, stretched, and uniformly scaled video presentation.
For a description of stretched uniformly scaled presentation, see the \l fillMode property
description.
- The video item is only visible when the \l hasVideo property is true and the video is playing.
+ The Video item is only visible when the \l hasVideo property is true and the video is playing.
\sa Audio
*/
@@ -169,7 +169,7 @@ QDeclarativeVideo::~QDeclarativeVideo()
*/
/*!
- \qmlproperty enum Video::status
+ \qmlproperty enumeration Video::status
This property holds the status of media loading. It can be one of:
@@ -236,7 +236,7 @@ QDeclarativeVideo::Status QDeclarativeVideo::status() const
*/
/*!
- \qmlproperty qreal Video::volume
+ \qmlproperty real Video::volume
This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
*/
@@ -270,7 +270,7 @@ bool QDeclarativeVideo::hasVideo() const
}
/*!
- \qmlproperty qreal Video::bufferProgress
+ \qmlproperty real Video::bufferProgress
This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
(full).
@@ -283,13 +283,13 @@ bool QDeclarativeVideo::hasVideo() const
*/
/*!
- \qmlproperty qreal Video::playbackRate
+ \qmlproperty real Video::playbackRate
This property holds the rate at which video is played at as a multiple of the normal rate.
*/
/*!
- \qmlproperty enum Video::error
+ \qmlproperty enumeration Video::error
This property holds the error state of the video. It can be one of:
@@ -325,7 +325,7 @@ QDeclarativeVideo::Error QDeclarativeVideo::error() const
*/
/*!
- \qmlproperty enum Video::fillMode
+ \qmlproperty enumeration Video::fillMode
Set this property to define how the video is scaled to fit the target area.
diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro
index 58bfe05..79ac543 100644
--- a/src/imports/particles/particles.pro
+++ b/src/imports/particles/particles.pro
@@ -21,8 +21,7 @@ symbian:{
load(data_caging_paths)
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/particles.dll \
- qmldir
+ importFiles.sources = particles.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index 264cba2..ecc6604 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -189,13 +189,13 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
*/
/*!
- \qmlproperty qreal ParticleMotionGravity::xattractor
- \qmlproperty qreal ParticleMotionGravity::yattractor
+ \qmlproperty real ParticleMotionGravity::xattractor
+ \qmlproperty real ParticleMotionGravity::yattractor
These properties hold the x and y coordinates of the point attracting the particles.
*/
/*!
- \qmlproperty qreal ParticleMotionGravity::acceleration
+ \qmlproperty real ParticleMotionGravity::acceleration
This property holds the acceleration to apply to the particles.
*/
@@ -303,14 +303,14 @@ Rectangle {
*/
/*!
- \qmlproperty qreal QDeclarativeParticleMotionWander::xvariance
- \qmlproperty qreal QDeclarativeParticleMotionWander::yvariance
+ \qmlproperty real QDeclarativeParticleMotionWander::xvariance
+ \qmlproperty real QDeclarativeParticleMotionWander::yvariance
These properties set the amount to wander in the x and y directions.
*/
/*!
- \qmlproperty qreal QDeclarativeParticleMotionWander::pace
+ \qmlproperty real QDeclarativeParticleMotionWander::pace
This property holds how quickly the paricles will move from side to side.
*/
@@ -859,7 +859,7 @@ void QDeclarativeParticles::setEmissionRate(int er)
}
/*!
- \qmlproperty qreal Particles::emissionVariance
+ \qmlproperty real Particles::emissionVariance
This property holds how inconsistent the rate of particle emissions are.
It is a number between 0 (no variance) and 1 (some variance).
diff --git a/src/imports/webkit/webkit.pro b/src/imports/webkit/webkit.pro
index 62db9ac..77cbc4d 100644
--- a/src/imports/webkit/webkit.pro
+++ b/src/imports/webkit/webkit.pro
@@ -18,8 +18,7 @@ symbian:{
load(data_caging_paths)
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/webkitqmlplugin.dll \
- qmldir
+ importFiles.sources = webkitqmlplugin.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/imports/widgets/graphicslayouts.cpp b/src/imports/widgets/graphicslayouts.cpp
index fc15ad2..25cf994 100644
--- a/src/imports/widgets/graphicslayouts.cpp
+++ b/src/imports/widgets/graphicslayouts.cpp
@@ -47,7 +47,7 @@
QT_BEGIN_NAMESPACE
LinearLayoutAttached::LinearLayoutAttached(QObject *parent)
-: QObject(parent), _stretch(1), _alignment(Qt::AlignCenter)
+: QObject(parent), _stretch(1), _alignment(Qt::AlignCenter), _spacing(0)
{
}
@@ -60,6 +60,15 @@ void LinearLayoutAttached::setStretchFactor(int f)
emit stretchChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _stretch);
}
+void LinearLayoutAttached::setSpacing(int s)
+{
+ if (_spacing == s)
+ return;
+
+ _spacing = s;
+ emit spacingChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _spacing);
+}
+
void LinearLayoutAttached::setAlignment(Qt::Alignment a)
{
if (_alignment == a)
@@ -99,10 +108,13 @@ insertItem(index, item);
if (LinearLayoutAttached *obj = attachedProperties.value(item)) {
setStretchFactor(item, obj->stretchFactor());
setAlignment(item, obj->alignment());
+ updateSpacing(item, obj->spacing());
QObject::connect(obj, SIGNAL(stretchChanged(QGraphicsLayoutItem*,int)),
this, SLOT(updateStretch(QGraphicsLayoutItem*,int)));
QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)),
this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment)));
+ QObject::connect(obj, SIGNAL(spacingChanged(QGraphicsLayoutItem*,int)),
+ this, SLOT(updateSpacing(QGraphicsLayoutItem*,int)));
//### need to disconnect when widget is removed?
}
}
@@ -114,11 +126,35 @@ for (int i = 0; i < count(); ++i)
removeAt(i);
}
+qreal QGraphicsLinearLayoutObject::contentsMargin() const
+{
+ qreal a,b,c,d;
+ getContentsMargins(&a, &b, &c, &d);
+ if(a==b && a==c && a==d)
+ return a;
+ return -1;
+}
+
+void QGraphicsLinearLayoutObject::setContentsMargin(qreal m)
+{
+ setContentsMargins(m,m,m,m);
+}
+
void QGraphicsLinearLayoutObject::updateStretch(QGraphicsLayoutItem *item, int stretch)
{
QGraphicsLinearLayout::setStretchFactor(item, stretch);
}
+void QGraphicsLinearLayoutObject::updateSpacing(QGraphicsLayoutItem* item, int spacing)
+{
+ for(int i=0; i < count(); i++){
+ if(itemAt(i) == item){ //I do not see the reverse function, which is why we must loop over all items
+ QGraphicsLinearLayout::setItemSpacing(i, spacing);
+ return;
+ }
+ }
+}
+
void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment)
{
QGraphicsLinearLayout::setAlignment(item, alignment);
@@ -139,7 +175,9 @@ return rv;
// QGraphicsGridLayout-related classes
//////////////////////////////////////////////////////////////////////////////////////////////////////
GridLayoutAttached::GridLayoutAttached(QObject *parent)
-: QObject(parent), _row(-1), _column(-1), _rowspan(1), _colspan(1), _alignment(-1)
+: QObject(parent), _row(-1), _column(-1), _rowspan(1), _colspan(1), _alignment(-1), _rowstretch(-1),
+ _colstretch(-1), _rowspacing(-1), _colspacing(-1), _rowprefheight(-1), _rowmaxheight(-1), _rowminheight(-1),
+ _rowfixheight(-1), _colprefwidth(-1), _colmaxwidth(-1), _colminwidth(-1), _colfixwidth(-1)
{
}
@@ -185,9 +223,30 @@ void GridLayoutAttached::setAlignment(Qt::Alignment a)
return;
_alignment = a;
- //emit alignmentChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _alignment);
+ emit alignmentChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _alignment);
+}
+
+void GridLayoutAttached::setRowStretchFactor(int f)
+{
+ _rowstretch = f;
+}
+
+void GridLayoutAttached::setColumnStretchFactor(int f)
+{
+ _colstretch = f;
+}
+
+void GridLayoutAttached::setRowSpacing(int s)
+{
+ _rowspacing = s;
}
+void GridLayoutAttached::setColumnSpacing(int s)
+{
+ _colspacing = s;
+}
+
+
QGraphicsGridLayoutObject::QGraphicsGridLayoutObject(QObject *parent)
: QObject(parent)
{
@@ -226,9 +285,36 @@ if (GridLayoutAttached *obj = attachedProperties.value(item)) {
qWarning() << "Must set row and column for an item in a grid layout";
return;
}
+ if(obj->rowSpacing() != -1)
+ setRowSpacing(row, obj->rowSpacing());
+ if(obj->columnSpacing() != -1)
+ setColumnSpacing(column, obj->columnSpacing());
+ if(obj->rowStretchFactor() != -1)
+ setRowStretchFactor(row, obj->rowStretchFactor());
+ if(obj->columnStretchFactor() != -1)
+ setColumnStretchFactor(column, obj->columnStretchFactor());
+ if(obj->rowPreferredHeight() != -1)
+ setRowPreferredHeight(row, obj->rowPreferredHeight());
+ if(obj->rowMaximumHeight() != -1)
+ setRowMaximumHeight(row, obj->rowMaximumHeight());
+ if(obj->rowMinimumHeight() != -1)
+ setRowMinimumHeight(row, obj->rowMinimumHeight());
+ if(obj->rowFixedHeight() != -1)
+ setRowFixedHeight(row, obj->rowFixedHeight());
+ if(obj->columnPreferredWidth() != -1)
+ setColumnPreferredWidth(row, obj->columnPreferredWidth());
+ if(obj->columnMaximumWidth() != -1)
+ setColumnMaximumWidth(row, obj->columnMaximumWidth());
+ if(obj->columnMinimumWidth() != -1)
+ setColumnMinimumWidth(row, obj->columnMinimumWidth());
+ if(obj->columnFixedWidth() != -1)
+ setColumnFixedWidth(row, obj->columnFixedWidth());
addItem(item, row, column, rowSpan, columnSpan);
if (alignment != -1)
setAlignment(item,alignment);
+ QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)),
+ this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment)));
+ //### need to disconnect when widget is removed?
}
}
@@ -246,6 +332,26 @@ if (verticalSpacing() == horizontalSpacing())
return -1; //###
}
+qreal QGraphicsGridLayoutObject::contentsMargin() const
+{
+ qreal a,b,c,d;
+ getContentsMargins(&a, &b, &c, &d);
+ if(a==b && a==c && a==d)
+ return a;
+ return -1;
+}
+
+void QGraphicsGridLayoutObject::setContentsMargin(qreal m)
+{
+ setContentsMargins(m,m,m,m);
+}
+
+
+void QGraphicsGridLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment)
+{
+QGraphicsGridLayout::setAlignment(item, alignment);
+}
+
QHash<QGraphicsLayoutItem*, GridLayoutAttached*> QGraphicsGridLayoutObject::attachedProperties;
GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj)
{
diff --git a/src/imports/widgets/graphicslayouts_p.h b/src/imports/widgets/graphicslayouts_p.h
index 1c3dfe5..ea9c614 100644
--- a/src/imports/widgets/graphicslayouts_p.h
+++ b/src/imports/widgets/graphicslayouts_p.h
@@ -71,6 +71,7 @@ class QGraphicsLinearLayoutObject : public QObject, public QGraphicsLinearLayout
Q_PROPERTY(QDeclarativeListProperty<QGraphicsLayoutItem> children READ children)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing)
+ Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin)
Q_CLASSINFO("DefaultProperty", "children")
public:
QGraphicsLinearLayoutObject(QObject * = 0);
@@ -80,8 +81,12 @@ public:
static LinearLayoutAttached *qmlAttachedProperties(QObject *);
+ qreal contentsMargin() const;
+ void setContentsMargin(qreal);
+
private Q_SLOTS:
void updateStretch(QGraphicsLayoutItem*,int);
+ void updateSpacing(QGraphicsLayoutItem*,int);
void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment);
private:
@@ -115,6 +120,7 @@ class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout
Q_PROPERTY(QDeclarativeListProperty<QGraphicsLayoutItem> children READ children)
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing)
+ Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin)
Q_PROPERTY(qreal verticalSpacing READ verticalSpacing WRITE setVerticalSpacing)
Q_PROPERTY(qreal horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing)
Q_CLASSINFO("DefaultProperty", "children")
@@ -125,9 +131,14 @@ public:
QDeclarativeListProperty<QGraphicsLayoutItem> children() { return QDeclarativeListProperty<QGraphicsLayoutItem>(this, 0, children_append, children_count, children_at, children_clear); }
qreal spacing() const;
+ qreal contentsMargin() const;
+ void setContentsMargin(qreal);
static GridLayoutAttached *qmlAttachedProperties(QObject *);
+private Q_SLOTS:
+ void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment);
+
private:
friend class GraphicsLayoutAttached;
void addWidget(QGraphicsWidget *);
@@ -158,6 +169,7 @@ class LinearLayoutAttached : public QObject
Q_PROPERTY(int stretchFactor READ stretchFactor WRITE setStretchFactor NOTIFY stretchChanged)
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged)
+ Q_PROPERTY(int spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
public:
LinearLayoutAttached(QObject *parent);
@@ -165,14 +177,18 @@ public:
void setStretchFactor(int f);
Qt::Alignment alignment() const { return _alignment; }
void setAlignment(Qt::Alignment a);
+ int spacing() const { return _spacing; }
+ void setSpacing(int s);
Q_SIGNALS:
void stretchChanged(QGraphicsLayoutItem*,int);
void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment);
+ void spacingChanged(QGraphicsLayoutItem*,int);
private:
int _stretch;
Qt::Alignment _alignment;
+ int _spacing;
};
class GridLayoutAttached : public QObject
@@ -184,6 +200,19 @@ class GridLayoutAttached : public QObject
Q_PROPERTY(int rowSpan READ rowSpan WRITE setRowSpan)
Q_PROPERTY(int columnSpan READ columnSpan WRITE setColumnSpan)
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
+ Q_PROPERTY(int rowStretchFactor READ rowStretchFactor WRITE setRowStretchFactor)
+ Q_PROPERTY(int columnStretchFactor READ columnStretchFactor WRITE setColumnStretchFactor)
+ Q_PROPERTY(int rowSpacing READ rowSpacing WRITE setRowSpacing)
+ Q_PROPERTY(int columnSpacing READ columnSpacing WRITE setColumnSpacing)
+ Q_PROPERTY(int rowPreferredHeight READ rowPreferredHeight WRITE setRowPreferredHeight)
+ Q_PROPERTY(int rowMinimumHeight READ rowMinimumHeight WRITE setRowMinimumHeight)
+ Q_PROPERTY(int rowMaximumHeight READ rowMaximumHeight WRITE setRowMaximumHeight)
+ Q_PROPERTY(int rowFixedHeight READ rowFixedHeight WRITE setRowFixedHeight)
+ Q_PROPERTY(int columnPreferredWidth READ columnPreferredWidth WRITE setColumnPreferredWidth)
+ Q_PROPERTY(int columnMaximumWidth READ columnMaximumWidth WRITE setColumnMaximumWidth)
+ Q_PROPERTY(int columnMinimumWidth READ columnMinimumWidth WRITE setColumnMinimumWidth)
+ Q_PROPERTY(int columnFixedWidth READ columnFixedWidth WRITE setColumnFixedWidth)
+
public:
GridLayoutAttached(QObject *parent);
@@ -202,12 +231,61 @@ public:
Qt::Alignment alignment() const { return _alignment; }
void setAlignment(Qt::Alignment a);
+ int rowStretchFactor() const { return _rowstretch; }
+ void setRowStretchFactor(int f);
+ int columnStretchFactor() const { return _colstretch; }
+ void setColumnStretchFactor(int f);
+
+ int rowSpacing() const { return _rowspacing; }
+ void setRowSpacing(int s);
+ int columnSpacing() const { return _colspacing; }
+ void setColumnSpacing(int s);
+
+ int rowPreferredHeight() const { return _rowprefheight; }
+ void setRowPreferredHeight(int s) { _rowprefheight = s; }
+
+ int rowMaximumHeight() const { return _rowmaxheight; }
+ void setRowMaximumHeight(int s) { _rowmaxheight = s; }
+
+ int rowMinimumHeight() const { return _rowminheight; }
+ void setRowMinimumHeight(int s) { _rowminheight = s; }
+
+ int rowFixedHeight() const { return _rowfixheight; }
+ void setRowFixedHeight(int s) { _rowfixheight = s; }
+
+ int columnPreferredWidth() const { return _colprefwidth; }
+ void setColumnPreferredWidth(int s) { _colprefwidth = s; }
+
+ int columnMaximumWidth() const { return _colmaxwidth; }
+ void setColumnMaximumWidth(int s) { _colmaxwidth = s; }
+
+ int columnMinimumWidth() const { return _colminwidth; }
+ void setColumnMinimumWidth(int s) { _colminwidth = s; }
+
+ int columnFixedWidth() const { return _colfixwidth; }
+ void setColumnFixedWidth(int s) { _colfixwidth = s; }
+
+Q_SIGNALS:
+ void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment);
+
private:
int _row;
int _column;
int _rowspan;
int _colspan;
Qt::Alignment _alignment;
+ int _rowstretch;
+ int _colstretch;
+ int _rowspacing;
+ int _colspacing;
+ int _rowprefheight;
+ int _rowmaxheight;
+ int _rowminheight;
+ int _rowfixheight;
+ int _colprefwidth;
+ int _colmaxwidth;
+ int _colminwidth;
+ int _colfixwidth;
};
QT_END_NAMESPACE
diff --git a/src/imports/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp
index 1a71a68..20de1fe 100644
--- a/src/imports/widgets/widgets.cpp
+++ b/src/imports/widgets/widgets.cpp
@@ -57,9 +57,9 @@ public:
qmlRegisterInterface<QGraphicsLayoutItem>("QGraphicsLayoutItem");
qmlRegisterInterface<QGraphicsLayout>("QGraphicsLayout");
- qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>(uri,4,6,"QGraphicsLinearLayoutStretchItem");
- qmlRegisterType<QGraphicsLinearLayoutObject>(uri,4,6,"QGraphicsLinearLayout");
- qmlRegisterType<QGraphicsGridLayoutObject>(uri,4,6,"QGraphicsGridLayout");
+ qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>(uri,4,7,"QGraphicsLinearLayoutStretchItem");
+ qmlRegisterType<QGraphicsLinearLayoutObject>(uri,4,7,"QGraphicsLinearLayout");
+ qmlRegisterType<QGraphicsGridLayoutObject>(uri,4,7,"QGraphicsGridLayout");
}
};
diff --git a/src/imports/widgets/widgets.pro b/src/imports/widgets/widgets.pro
index f26e4b9..234ff1e 100644
--- a/src/imports/widgets/widgets.pro
+++ b/src/imports/widgets/widgets.pro
@@ -21,8 +21,7 @@ symbian:{
load(data_caging_paths)
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- importFiles.sources = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/widgets.dll \
- qmldir
+ importFiles.sources = widgets.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
DEPLOYMENT = importFiles
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
index d34e532..1992ee5 100644
--- a/src/multimedia/effects/qsoundeffect.cpp
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass SoundEffect QSoundEffect
\since 4.7
- \brief The SoundEffect element provides a way to play sound effects in qml.
+ \brief The SoundEffect element provides a way to play sound effects in QML.
This element is part of the \bold{Qt.multimedia 4.7} module.
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty QUrl SoundEffect::source
+ \qmlproperty url SoundEffect::source
This property provides a way to control the sound to play.
*/
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index dfce7d2..c3809b2 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -143,6 +143,25 @@ symbian: {
contains(QT_CONFIG, declarative): {
qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative$${QT_LIBINFIX}.dll
+
+ widgetImport.sources = widgets.dll $$QT_BUILD_TREE/src/imports/widgets/qmldir
+ widgetImport.path = $$QT_IMPORTS_BASE_DIR/Qt/widgets
+ DEPLOYMENT += widgetImport
+
+ particlesImport.sources = particles.dll $$QT_BUILD_TREE/src/imports/particles/qmldir
+ particlesImport.path = $$QT_IMPORTS_BASE_DIR/Qt/labs/particles
+ DEPLOYMENT += particlesImport
+
+ contains(QT_CONFIG, webkit): {
+ webkitImport.sources = webkitqmlplugin.dll $$QT_BUILD_TREE/src/imports/webkit/qmldir
+ webkitImport.path = $$QT_IMPORTS_BASE_DIR/org/webkit
+ DEPLOYMENT += webkitImport
+ }
+ contains(QT_CONFIG, multimedia): {
+ multimediaImport.sources = multimedia.dll $$QT_BUILD_TREE/src/imports/multimedia/qmldir
+ multimediaImport.path = $$QT_IMPORTS_BASE_DIR/Qt/multimedia
+ DEPLOYMENT += multimediaImport
+ }
}
graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 7834650..9b3b3d0 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -59,10 +59,12 @@ SUBDIRS += \
qdeclarativerepeater \ # Cover
qdeclarativeworkerscript \ # Cover
qdeclarativevaluetypes \ # Cover
+ qdeclarativeview \ # Cover
qdeclarativexmlhttprequest \ # Cover
qdeclarativeimageprovider \ # Cover
qdeclarativestyledtext \ # Cover
qdeclarativesqldatabase \ # Cover
+ qdeclarativevisualdatamodel \ # Cover
qmlvisual # Cover
contains(QT_CONFIG, webkit) {
diff --git a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
index 714ae7c..d6cf4de 100644
--- a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
+++ b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
@@ -1,7 +1,8 @@
-import Qt 4.6
-import Qt.widgets 4.6
+import Qt 4.7
+import Qt.widgets 4.7
QGraphicsWidget {
+ geometry: "20,0,600x400"
layout: QGraphicsLinearLayout {
orientation: Qt.Horizontal
QGraphicsWidget {
@@ -9,6 +10,7 @@ QGraphicsWidget {
spacing: 10; orientation: Qt.Vertical
LayoutItem {
QGraphicsLinearLayout.stretchFactor: 1
+ QGraphicsLinearLayout.spacing: 1
objectName: "left"
minimumSize: "100x100"
maximumSize: "300x300"
@@ -17,6 +19,7 @@ QGraphicsWidget {
}
LayoutItem {
QGraphicsLinearLayout.stretchFactor: 10
+ QGraphicsLinearLayout.spacing: 10
objectName: "left"
minimumSize: "100x100"
maximumSize: "300x300"
@@ -27,7 +30,7 @@ QGraphicsWidget {
}
QGraphicsWidget {
layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Vertical
+ spacing: 10; orientation: Qt.Horizontal; contentsMargin: 10
LayoutItem {
objectName: "left"
minimumSize: "100x100"
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index 41c0a1b..294f2f7 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -65,7 +65,7 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
{
QStringList rv;
- QStringList files = d.entryList(QStringList() << QLatin1String("*.js"),
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.js"),
QDir::Files);
foreach (const QString &file, files) {
if (file == "browser.js")
@@ -73,7 +73,7 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
rv << d.absoluteFilePath(file);
}
- QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
QDir::NoSymLinks);
foreach (const QString &dir, dirs) {
QDir sub = d;
@@ -130,17 +130,24 @@ void tst_parserstress::ecmascript()
QDeclarativeComponent component(&engine);
component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
- QSet<QString> failingTests;
- failingTests << "uc-003.js" << "uc-005.js" << "regress-352044-02-n.js"
- << "regress-334158.js" << "regress-58274.js" << "dowhile-006.js" << "dowhile-005.js";
+
QFileInfo info(file);
- foreach (const QString &failing, failingTests) {
- if (info.fileName().endsWith(failing)) {
- QEXPECT_FAIL("", "QTBUG-8108", Continue);
- break;
- }
+
+ if (info.fileName() == QLatin1String("regress-352044-02-n.js")) {
+ QVERIFY(component.isError());
+
+ QCOMPARE(component.errors().length(), 2);
+
+ QCOMPARE(component.errors().at(0).description(), QString("Expected token `;'"));
+ QCOMPARE(component.errors().at(0).line(), 66);
+
+ QCOMPARE(component.errors().at(1).description(), QString("Expected token `;'"));
+ QCOMPARE(component.errors().at(1).line(), 142);
+
+ } else {
+
+ QVERIFY(!component.isError());
}
- QVERIFY(!component.isError());
}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml b/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml
index b64d0b0..227a055 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
index ba424b9..91973a3 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.widgets 4.7
Rectangle {
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml b/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml
index 09b97f6..e248cc3 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml b/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml
index fd9dc55..01b469b 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Column {
Text {
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/fill.qml b/tests/auto/declarative/qdeclarativeanchors/data/fill.qml
index 902465c..c594365 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/fill.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/fill.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml b/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml
index a266612..bd7f3de 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: rect
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml b/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml
index acb57cd..e2dfde2 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container;
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/margins.qml b/tests/auto/declarative/qdeclarativeanchors/data/margins.qml
index 4a29e77..58bc8a8 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/margins.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/margins.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 01b5bc5..dff62c7 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -49,7 +49,7 @@
#include <private/qdeclarativetext_p.h>
#include <QtDeclarative/private/qdeclarativeanchors_p_p.h>
-Q_DECLARE_METATYPE(QDeclarativeAnchors::UsedAnchor)
+Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
@@ -262,7 +262,7 @@ void tst_qdeclarativeanchors::loops()
{
QUrl source(QUrl::fromLocalFile(SRCDIR "/data/loop1.qml"));
- QString expect = "QML Text (" + source.toString() + ":6:5" + ") Possible anchor loop detected on horizontal anchor.";
+ QString expect = source.toString() + ":6:5: QML Text: Possible anchor loop detected on horizontal anchor.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
@@ -277,7 +277,7 @@ void tst_qdeclarativeanchors::loops()
{
QUrl source(QUrl::fromLocalFile(SRCDIR "/data/loop2.qml"));
- QString expect = "QML Image (" + source.toString() + ":8:3" + ") Possible anchor loop detected on horizontal anchor.";
+ QString expect = source.toString() + ":8:3: QML Image: Possible anchor loop detected on horizontal anchor.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
QDeclarativeView *view = new QDeclarativeView;
@@ -312,62 +312,62 @@ void tst_qdeclarativeanchors::illegalSets_data()
QTest::newRow("H - too many anchors")
<< "Rectangle { id: rect; Rectangle { anchors.left: rect.left; anchors.right: rect.right; anchors.horizontalCenter: rect.horizontalCenter } }"
- << "QML Rectangle (file::2:23) Cannot specify left, right, and hcenter anchors.";
+ << "file::2:23: QML Rectangle: Cannot specify left, right, and hcenter anchors.";
foreach (const QString &side, QStringList() << "left" << "right") {
QTest::newRow("H - anchor to V")
<< QString("Rectangle { Rectangle { anchors.%1: parent.top } }").arg(side)
- << "QML Rectangle (file::2:13) Cannot anchor a horizontal edge to a vertical edge.";
+ << "file::2:13: QML Rectangle: Cannot anchor a horizontal edge to a vertical edge.";
QTest::newRow("H - anchor to non parent/sibling")
<< QString("Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.%1: rect.%1 } }").arg(side)
- << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+ << "file::2:45: QML Rectangle: Cannot anchor to an item that isn't a parent or sibling.";
QTest::newRow("H - anchor to self")
<< QString("Rectangle { id: rect; anchors.%1: rect.%1 }").arg(side)
- << "QML Rectangle (file::2:1) Cannot anchor item to self.";
+ << "file::2:1: QML Rectangle: Cannot anchor item to self.";
}
QTest::newRow("V - too many anchors")
<< "Rectangle { id: rect; Rectangle { anchors.top: rect.top; anchors.bottom: rect.bottom; anchors.verticalCenter: rect.verticalCenter } }"
- << "QML Rectangle (file::2:23) Cannot specify top, bottom, and vcenter anchors.";
+ << "file::2:23: QML Rectangle: Cannot specify top, bottom, and vcenter anchors.";
QTest::newRow("V - too many anchors with baseline")
<< "Rectangle { Text { id: text1; text: \"Hello\" } Text { anchors.baseline: text1.baseline; anchors.top: text1.top; } }"
- << "QML Text (file::2:47) Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.";
+ << "file::2:47: QML Text: Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.";
foreach (const QString &side, QStringList() << "top" << "bottom" << "baseline") {
QTest::newRow("V - anchor to H")
<< QString("Rectangle { Rectangle { anchors.%1: parent.left } }").arg(side)
- << "QML Rectangle (file::2:13) Cannot anchor a vertical edge to a horizontal edge.";
+ << "file::2:13: QML Rectangle: Cannot anchor a vertical edge to a horizontal edge.";
QTest::newRow("V - anchor to non parent/sibling")
<< QString("Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.%1: rect.%1 } }").arg(side)
- << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+ << "file::2:45: QML Rectangle: Cannot anchor to an item that isn't a parent or sibling.";
QTest::newRow("V - anchor to self")
<< QString("Rectangle { id: rect; anchors.%1: rect.%1 }").arg(side)
- << "QML Rectangle (file::2:1) Cannot anchor item to self.";
+ << "file::2:1: QML Rectangle: Cannot anchor item to self.";
}
QTest::newRow("centerIn - anchor to non parent/sibling")
<< "Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.centerIn: rect} }"
- << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+ << "file::2:45: QML Rectangle: Cannot anchor to an item that isn't a parent or sibling.";
QTest::newRow("fill - anchor to non parent/sibling")
<< "Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.fill: rect} }"
- << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+ << "file::2:45: QML Rectangle: Cannot anchor to an item that isn't a parent or sibling.";
}
void tst_qdeclarativeanchors::reset()
{
QFETCH(QString, side);
QFETCH(QDeclarativeAnchorLine::AnchorLine, anchorLine);
- QFETCH(QDeclarativeAnchors::UsedAnchor, usedAnchor);
+ QFETCH(QDeclarativeAnchors::Anchor, usedAnchor);
QDeclarativeItem *baseItem = new QDeclarativeItem;
@@ -394,16 +394,16 @@ void tst_qdeclarativeanchors::reset_data()
{
QTest::addColumn<QString>("side");
QTest::addColumn<QDeclarativeAnchorLine::AnchorLine>("anchorLine");
- QTest::addColumn<QDeclarativeAnchors::UsedAnchor>("usedAnchor");
+ QTest::addColumn<QDeclarativeAnchors::Anchor>("usedAnchor");
- QTest::newRow("left") << "left" << QDeclarativeAnchorLine::Left << QDeclarativeAnchors::HasLeftAnchor;
- QTest::newRow("top") << "top" << QDeclarativeAnchorLine::Top << QDeclarativeAnchors::HasTopAnchor;
- QTest::newRow("right") << "right" << QDeclarativeAnchorLine::Right << QDeclarativeAnchors::HasRightAnchor;
- QTest::newRow("bottom") << "bottom" << QDeclarativeAnchorLine::Bottom << QDeclarativeAnchors::HasBottomAnchor;
+ QTest::newRow("left") << "left" << QDeclarativeAnchorLine::Left << QDeclarativeAnchors::LeftAnchor;
+ QTest::newRow("top") << "top" << QDeclarativeAnchorLine::Top << QDeclarativeAnchors::TopAnchor;
+ QTest::newRow("right") << "right" << QDeclarativeAnchorLine::Right << QDeclarativeAnchors::RightAnchor;
+ QTest::newRow("bottom") << "bottom" << QDeclarativeAnchorLine::Bottom << QDeclarativeAnchors::BottomAnchor;
- QTest::newRow("hcenter") << "horizontalCenter" << QDeclarativeAnchorLine::HCenter << QDeclarativeAnchors::HasHCenterAnchor;
- QTest::newRow("vcenter") << "verticalCenter" << QDeclarativeAnchorLine::VCenter << QDeclarativeAnchors::HasVCenterAnchor;
- QTest::newRow("baseline") << "baseline" << QDeclarativeAnchorLine::Baseline << QDeclarativeAnchors::HasBaselineAnchor;
+ QTest::newRow("hcenter") << "horizontalCenter" << QDeclarativeAnchorLine::HCenter << QDeclarativeAnchors::HCenterAnchor;
+ QTest::newRow("vcenter") << "verticalCenter" << QDeclarativeAnchorLine::VCenter << QDeclarativeAnchors::VCenterAnchor;
+ QTest::newRow("baseline") << "baseline" << QDeclarativeAnchorLine::Baseline << QDeclarativeAnchors::BaselineAnchor;
}
void tst_qdeclarativeanchors::resetConvenience()
@@ -437,7 +437,7 @@ void tst_qdeclarativeanchors::nullItem()
const QMetaObject *meta = item->anchors()->metaObject();
QMetaProperty p = meta->property(meta->indexOfProperty(side.toUtf8().constData()));
- QTest::ignoreMessage(QtWarningMsg, "QML Item (unknown location) Cannot anchor to a null item.");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML Item: Cannot anchor to a null item.");
QVERIFY(p.write(item->anchors(), qVariantFromValue(anchor)));
delete item;
@@ -461,7 +461,7 @@ void tst_qdeclarativeanchors::crash1()
{
QUrl source(QUrl::fromLocalFile(SRCDIR "/data/crash1.qml"));
- QString expect = "QML Text (" + source.toString() + ":4:5" + ") Possible anchor loop detected on fill.";
+ QString expect = source.toString() + ":4:5: QML Text: Possible anchor loop detected on fill.";
QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml
index 5bada34..62e5b14 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
source: "colors.gif"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml
index a70db5d..3400789 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
source: "stickman.gif"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml
index 5b0bdcb..566f9ea 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanerror1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
sourceSize: "240x180"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml
index 7ab17d4..92c57b6 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
source: "stickman.gif"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml
index f4d277a..b8a254f 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanscaled.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
width: 240
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml
index 53b0c3a..2b6074c 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
AnimatedImage {
source: "stickman.gif"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 0fb080c..237a436 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -199,7 +199,7 @@ void tst_qdeclarativeanimatedimage::invalidSource()
component.setData("import Qt 4.7\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
QVERIFY(component.isReady());
- QTest::ignoreMessage(QtWarningMsg, "Error Reading Animated Image File QUrl( \"file:no-such-file.gif\" ) ");
+ QTest::ignoreMessage(QtWarningMsg, "file::2:2: QML AnimatedImage: Error Reading Animated Image File file:no-such-file.gif");
QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
QVERIFY(anim);
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/attached.qml b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml
index 0fb6f8c..78949f9 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/attached.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 180; height: 200;
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml b/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml
index d31cae9..5bb20f6 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml b/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml
index 3b8b111..8dc422c 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml
index 2629cf4..89cc424 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml
index 1543a2a..f14eaee 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml
index aa98c33..dd0368c 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml
index e80762f..8d3d05e 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
index d6bfe45..09987de 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml
index efed058..aab9d11 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml
index 1a6540f..034531c 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml b/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml
index 9f0e699..0e77c48 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml
index 6770366..def350e 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml
index 80c9473..a95bf2a 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml
index 4437815..9e4a74e 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/properties.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml
index b1f2020..5de813e 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml
index 0a0ed6f..cf1bc3f 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml
index a90f004..ce9f632 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml
index 7d3cec9..a7f5116 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml
index b13b94b..d8ef5d6 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml
index 033c5c1..b3b827d 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml
index d0704c9..e6f773c 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml
index e70c95c..0ae717a 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml
index b9e27da..44cedf0 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
index 7417ed1..277cc1b 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
index e9c57d4..6e48585 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 600; height: 200
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml
index 2260440..bb6b028 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml
index 36d6c72..b844bd8 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index 959cc19..e217e34 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -339,13 +339,13 @@ void tst_qdeclarativeanimations::badProperties()
QDeclarativeEngine engine;
QDeclarativeComponent c1(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml"));
- QByteArray message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml").toString().toUtf8() + ":18:9) Cannot animate non-existent property \"border.colr\"";
+ QByteArray message = QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate non-existent property \"border.colr\"";
QTest::ignoreMessage(QtWarningMsg, message);
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c1.create());
QVERIFY(rect);
QDeclarativeComponent c2(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml"));
- message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml").toString().toUtf8() + ":18:9) Cannot animate read-only property \"border\"";
+ message = QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate read-only property \"border\"";
QTest::ignoreMessage(QtWarningMsg, message);
rect = qobject_cast<QDeclarativeRectangle*>(c2.create());
QVERIFY(rect);
@@ -549,12 +549,12 @@ void tst_qdeclarativeanimations::propertiesTransition()
void tst_qdeclarativeanimations::invalidDuration()
{
QDeclarativePropertyAnimation *animation = new QDeclarativePropertyAnimation;
- QTest::ignoreMessage(QtWarningMsg, "QML PropertyAnimation (unknown location) Cannot set a duration of < 0");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML PropertyAnimation: Cannot set a duration of < 0");
animation->setDuration(-1);
QCOMPARE(animation->duration(), 250);
QDeclarativePauseAnimation *pauseAnimation = new QDeclarativePauseAnimation;
- QTest::ignoreMessage(QtWarningMsg, "QML PauseAnimation (unknown location) Cannot set a duration of < 0");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML PauseAnimation: Cannot set a duration of < 0");
pauseAnimation->setDuration(-1);
QCOMPARE(pauseAnimation->duration(), 250);
}
@@ -620,7 +620,8 @@ void tst_qdeclarativeanimations::dontStart()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QString warning = c.url().toString() + ":14:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
@@ -634,7 +635,8 @@ void tst_qdeclarativeanimations::dontStart()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart2.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QString warning = c.url().toString() + ":15:17: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
index e9fb286..62e6be5 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml
index f2f4742..e075bd0 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml
index 3ea9376..c766f42 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml
index 1403eb9..e1f4699 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml
index 5e1891a..c0f4eac 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml
index 5e30f03..b58e332 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml
index ca0ea54..0b5d00b 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml
index a6c4ed9..6eb0729 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml
index 2dda220..42b80a5 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml
index 6187768..9e328d6 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml
index 640a7d1..5857c4d 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml
index 3860ec7..e3fd77d 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
index 11b2d3a..4528cce 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
index 795b309..f2f6352 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml
index 5e72bca..de27f69 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
height: 400
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 3bff2f5..ee9e282 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -272,7 +272,8 @@ void tst_qdeclarativebehaviors::reassignedAnimation()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml"));
- QTest::ignoreMessage(QtWarningMsg, QString("QML Behavior (" + QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9) Cannot change the animation assigned to a Behavior.").toUtf8().constData());
+ QString warning = QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9: QML Behavior: Cannot change the animation assigned to a Behavior.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
QTRY_COMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
@@ -303,7 +304,8 @@ void tst_qdeclarativebehaviors::dontStart()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QString warning = c.url().toString() + ":13:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml
index 8f5b39e..9c619e6 100644
--- a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml
+++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: screen
diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml
index ea20c16..e0f1811 100644
--- a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml
+++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: screen
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 8621239..69b4a89 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -121,10 +121,10 @@ void tst_qdeclarativeborderimage::imageSource_data()
QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << false << "";
QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << false
- << "QML BorderImage (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
+ << "file::2:1: QML BorderImage: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << "";
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true
- << "QML BorderImage (file::2:1) Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
+ << "file::2:1: QML BorderImage: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
}
void tst_qdeclarativeborderimage::imageSource()
@@ -304,8 +304,8 @@ void tst_qdeclarativeborderimage::sciSource_data()
void tst_qdeclarativeborderimage::invalidSciFile()
{
- QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Roun"
- QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Repea"
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Roun"
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Repea"
QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml
index 81ab599..954ca97 100644
--- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: screen; width: 50
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml
index 22e9422..9e5a99c 100644
--- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Connections { id: connection; target: connection; onTargetChanged: 1 == 1 }
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml
index 6e396c0..51efde6 100644
--- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Connections {}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml
index 736d5e8..361474c 100644
--- a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml
+++ b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: screen; width: 50
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index 133dcb8..e2d3ee4 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -60,6 +60,7 @@
#include <private/qdeclarativemetatype_p.h>
#include <private/qdeclarativeproperty_p.h>
+#include "../../../shared/util.h"
#include "../shared/debugutil_p.h"
Q_DECLARE_METATYPE(QDeclarativeDebugWatch::State)
@@ -69,14 +70,6 @@ class tst_QDeclarativeDebug : public QObject
{
Q_OBJECT
-public:
- tst_QDeclarativeDebug(QDeclarativeDebugTestData *data)
- {
- m_conn = data->conn;
- m_engine = data->engine;
- m_rootItem = data->items[0];
- }
-
private:
QDeclarativeDebugObjectReference findRootObject();
QDeclarativeDebugPropertyReference findProperty(const QList<QDeclarativeDebugPropertyReference> &props, const QString &name) const;
@@ -93,8 +86,11 @@ private:
QDeclarativeEngine *m_engine;
QDeclarativeItem *m_rootItem;
+ QObjectList m_components;
+
private slots:
void initTestCase();
+ void cleanupTestCase();
void watch_property();
void watch_object();
@@ -278,9 +274,52 @@ void tst_QDeclarativeDebug::compareProperties(const QDeclarativeDebugPropertyRef
void tst_QDeclarativeDebug::initTestCase()
{
+ qRegisterMetaType<QDeclarativeDebugWatch::State>();
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768...");
+ qputenv("QML_DEBUG_SERVER_PORT", "3768");
+ m_engine = new QDeclarativeEngine(this);
+
+ QList<QByteArray> qml;
+ qml << "import Qt 4.7\n"
+ "Item {"
+ "width: 10; height: 20; scale: blueRect.scale;"
+ "Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }"
+ "Text { color: blueRect.color; }"
+ "MouseArea {"
+ "onEntered: { console.log('hello') }"
+ "}"
+ "}";
+ // add second component to test multiple root contexts
+ qml << "import Qt 4.7\n"
+ "Item {}";
+
+ for (int i=0; i<qml.count(); i++) {
+ QDeclarativeComponent component(m_engine);
+ component.setData(qml[i], QUrl::fromLocalFile(""));
+ Q_ASSERT(component.isReady()); // fails if bad syntax
+ m_components << qobject_cast<QDeclarativeItem*>(component.create());
+ }
+ m_rootItem = qobject_cast<QDeclarativeItem*>(m_components.first());
+
+ // add an extra context to test for multiple contexts
+ QDeclarativeContext *context = new QDeclarativeContext(m_engine->rootContext(), this);
+ context->setObjectName("tst_QDeclarativeDebug_childContext");
+
+ m_conn = new QDeclarativeDebugConnection(this);
+ m_conn->connectToHost("127.0.0.1", 3768);
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
+ bool ok = m_conn->waitForConnected();
+ Q_ASSERT(ok);
+ QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient());
+
m_dbg = new QDeclarativeEngineDebug(m_conn, this);
+}
- qRegisterMetaType<QDeclarativeDebugWatch::State>();
+void tst_QDeclarativeDebug::cleanupTestCase()
+{
+ qDeleteAll(m_components);
}
void tst_QDeclarativeDebug::watch_property()
@@ -804,40 +843,6 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference()
compareProperties(r, ref);
}
-
-class tst_QDeclarativeDebug_Factory : public QDeclarativeTestFactory
-{
-public:
- QObject *createTest(QDeclarativeDebugTestData *data)
- {
- tst_QDeclarativeDebug *test = new tst_QDeclarativeDebug(data);
- QDeclarativeContext *c = new QDeclarativeContext(data->engine->rootContext(), test);
- c->setObjectName("tst_QDeclarativeDebug_childContext");
- return test;
- }
-};
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QList<QByteArray> qml;
- qml << "import Qt 4.7\n"
- "Item {"
- "width: 10; height: 20; scale: blueRect.scale;"
- "Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }"
- "Text { color: blueRect.color; }"
- "MouseArea {"
- "onEntered: { console.log('hello') }"
- "}"
- "}";
- // add second component to test multiple root contexts
- qml << "import Qt 4.7\n"
- "Item {}";
- tst_QDeclarativeDebug_Factory factory;
- return QDeclarativeDebugTest::runTests(&factory, qml);
-}
-
-//QTEST_MAIN(tst_QDeclarativeDebug)
+QTEST_MAIN(tst_QDeclarativeDebug)
#include "tst_qdeclarativedebug.moc"
diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
index d3679a7..a19c2c2 100644
--- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
+++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -52,21 +52,19 @@
#include <private/qdeclarativedebugclient_p.h>
#include <private/qdeclarativedebugservice_p.h>
+#include "../../../shared/util.h"
#include "../shared/debugutil_p.h"
class tst_QDeclarativeDebugClient : public QObject
{
Q_OBJECT
-public:
- tst_QDeclarativeDebugClient(QDeclarativeDebugTestData *data)
- {
- m_conn = data->conn;
- }
-
+private:
QDeclarativeDebugConnection *m_conn;
private slots:
+ void initTestCase();
+
void name();
void isEnabled();
void setEnabled();
@@ -74,6 +72,23 @@ private slots:
void sendMessage();
};
+void tst_QDeclarativeDebugClient::initTestCase()
+{
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770...");
+
+ qputenv("QML_DEBUG_SERVER_PORT", "3770");
+ new QDeclarativeEngine(this);
+
+ m_conn = new QDeclarativeDebugConnection(this);
+ m_conn->connectToHost("127.0.0.1", 3770);
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
+ bool ok = m_conn->waitForConnected();
+ Q_ASSERT(ok);
+
+ QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient());
+}
+
void tst_QDeclarativeDebugClient::name()
{
QString name = "tst_QDeclarativeDebugClient::name()";
@@ -136,22 +151,7 @@ void tst_QDeclarativeDebugClient::sendMessage()
QCOMPARE(resp, msg);
}
-
-class tst_QDeclarativeDebugClient_Factory : public QDeclarativeTestFactory
-{
-public:
- QObject *createTest(QDeclarativeDebugTestData *data) { return new tst_QDeclarativeDebugClient(data); }
-};
-
-
-// This does not use QTEST_MAIN because the test has to be created and run
-// in a separate thread.
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- tst_QDeclarativeDebugClient_Factory factory;
- return QDeclarativeDebugTest::runTests(&factory);
-}
+QTEST_MAIN(tst_QDeclarativeDebugClient)
#include "tst_qdeclarativedebugclient.moc"
+
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index c8fc001..9ebbbaf 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -52,21 +52,19 @@
#include <private/qdeclarativedebugclient_p.h>
#include <private/qdeclarativedebugservice_p.h>
+#include "../../../shared/util.h"
#include "../shared/debugutil_p.h"
+
class tst_QDeclarativeDebugService : public QObject
{
Q_OBJECT
-
-public:
- tst_QDeclarativeDebugService(QDeclarativeDebugTestData *data)
- {
- m_conn = data->conn;
- }
-
+private:
QDeclarativeDebugConnection *m_conn;
private slots:
+ void initTestCase();
+
void name();
void isEnabled();
void enabledChanged();
@@ -76,6 +74,22 @@ private slots:
void objectToString();
};
+void tst_QDeclarativeDebugService::initTestCase()
+{
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769...");
+ qputenv("QML_DEBUG_SERVER_PORT", "3769");
+ new QDeclarativeEngine(this);
+
+ m_conn = new QDeclarativeDebugConnection(this);
+ m_conn->connectToHost("127.0.0.1", 3769);
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
+ bool ok = m_conn->waitForConnected();
+ Q_ASSERT(ok);
+
+ QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient());
+}
+
void tst_QDeclarativeDebugService::name()
{
QString name = "tst_QDeclarativeDebugService::name()";
@@ -140,7 +154,7 @@ void tst_QDeclarativeDebugService::idForObject()
int idB = QDeclarativeDebugService::idForObject(objB);
QVERIFY(idB != idA);
QCOMPARE(QDeclarativeDebugService::objectForId(idB), objB);
-
+
delete objA;
delete objB;
}
@@ -170,21 +184,6 @@ void tst_QDeclarativeDebugService::objectToString()
delete obj;
}
-
-class tst_QDeclarativeDebugService_Factory : public QDeclarativeTestFactory
-{
-public:
- QObject *createTest(QDeclarativeDebugTestData *data) { return new tst_QDeclarativeDebugService(data); }
-};
-
-// This does not use QTEST_MAIN because the test has to be created and run
-// in a separate thread.
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- tst_QDeclarativeDebugService_Factory factory;
- return QDeclarativeDebugTest::runTests(&factory);
-}
+QTEST_MAIN(tst_QDeclarativeDebugService)
#include "tst_qdeclarativedebugservice.moc"
diff --git a/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml
index 1472f01..dd9e9ea 100644
--- a/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
}
diff --git a/tests/auto/declarative/qdeclarativedom/data/MyItem.qml b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml
index 1472f01..dd9e9ea 100644
--- a/tests/auto/declarative/qdeclarativedom/data/MyItem.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
}
diff --git a/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
index 2d1a4a3..d26b299 100644
--- a/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml
index 2d1a4a3..d26b299 100644
--- a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
diff --git a/tests/auto/declarative/qdeclarativedom/data/top.qml b/tests/auto/declarative/qdeclarativedom/data/top.qml
index 2681993..6405cd2 100644
--- a/tests/auto/declarative/qdeclarativedom/data/top.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/top.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
MyComponent {
width: 100
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 1f0c47c..a951827 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -1303,7 +1303,8 @@ void tst_qdeclarativedom::position()
QCOMPARE(child2Value.length(), 6);
// All QDeclarativeDomList
- qWarning("QDeclarativeListValue position test required");
+ QCOMPARE(childrenList.position(), 189);
+ QCOMPARE(childrenList.length(), 18);
}
QTEST_MAIN(tst_qdeclarativedom)
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml
index 691d9ec..170d027 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string greeting: "hello world"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml
index f51ca86..e9a41ed 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
function testFunction() { return 19; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
index 28252df..6e50b10 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int b: obj.prop.a
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml
index b7bec63..fe0492f 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml
@@ -1,14 +1,12 @@
-import Qt 4.6
+import Qt 4.7
Item {
property int a: 3
property int binding: myFunction();
property int binding2: myCompFunction();
- Script {
- function myCompFunction() {
- return a;
- }
+ function myCompFunction() {
+ return a;
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml
index 86c312c..e144de7 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property int children: root.children.length
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml
index 5c3ea1f..515f80f 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyQmlObject {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml
index 128db69..72ae865 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml
index 4b5464d..f31f142 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
QtObject {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml
index 266de76..88740dc 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a: 10
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml
new file mode 100644
index 0000000..3fd9131
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml
@@ -0,0 +1,9 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property bool runTest: false
+
+ property variant a: MyQmlObject {}
+
+ objectProperty: (runTest == false)?a:null
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml
new file mode 100644
index 0000000..7530396
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+import Qt 4.7
+
+MyQmlObject {
+ objectProperty: MyQmlObject {}
+
+ Component.onCompleted: {
+ objectProperty = null;
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
index 1c88700..a883e85 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
//real
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml
index 80a2814..1dc0ada 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property CustomObject myObject
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml
index 6c538fe..6fc1211 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
function calculate() {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
index 29eba42..72b59ae 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
QtObject {
@@ -20,6 +20,6 @@ QtObject {
myObject.deleteOnSet = 1;
test3 = myObject.value == undefined;
- // test4 = obj.value == undefined;
+ test4 = obj.value == undefined;
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
index 2fef03a..3047e9b 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
@@ -5,23 +5,23 @@ MyQmlObject{
objectName: "obj"
function createOne()
{
- obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"objectOne"}', obj);
+ obj.objectProperty = Qt.createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"objectOne"}', obj);
}
function createTwo()
{
- var component = createComponent('dynamicCreation.helper.qml');
+ var component = Qt.createComponent('dynamicCreation.helper.qml');
obj.objectProperty = component.createObject();
}
function createThree()
{
- obj.objectProperty = createQmlObject('TypeForDynamicCreation{}', obj);
+ obj.objectProperty = Qt.createQmlObject('TypeForDynamicCreation{}', obj);
}
function dontCrash()
{
- var component = createComponent('file-doesnt-exist.qml');
+ var component = Qt.createComponent('file-doesnt-exist.qml');
obj.objectProperty = component.createObject();
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml
index 0855b29..f41e526 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml
@@ -5,7 +5,7 @@ MyQmlObject{
objectName: "obj"
function create()
{
- obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
+ obj.objectProperty = Qt.createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
}
function killOther()
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml
index acc3163..14046f0 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyQmlObject {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml
index 44e10c1..146f6f1 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyQmlObject {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml
index 9a82ad1..dc78cd8 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property MyExtendedObject a;
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
index 566f5ed..c57e5f8 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyExtendedObject
{
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml
new file mode 100644
index 0000000..3c443cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjectsPropertyOverride.qml
@@ -0,0 +1,7 @@
+import Qt.test 1.0
+
+OverrideDefaultPropertyObject
+{
+ MyBaseExtendedObject {
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml
deleted file mode 100644
index 2ac7b6e..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt 4.6
-
-QtObject {
- property int test: external_script_func();
-
- Script {
- // Single source as non-array literal
- source: "externalScript.js"
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js
deleted file mode 100644
index 78c3a86..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js
+++ /dev/null
@@ -1,8 +0,0 @@
-function external_script_func2() {
- return a;
-}
-
-function is_a_undefined() {
- return a == undefined;
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml
deleted file mode 100644
index dec657c..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt 4.6
-
-QtObject {
- property int test: external_script_func();
-
- Script {
- // Single source as array
- source: [ "externalScript.js" ]
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml
deleted file mode 100644
index d7acf38..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import Qt 4.6
-
-QtObject {
- property int test: external_script_func();
- property int test2: external_script_func2();
- property bool test3: is_a_undefined();
-
- Script {
- // Multiple script
- source: [ "externalScript.js", "externalScript.2.js" ]
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml
deleted file mode 100644
index 16211aa..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import Qt 4.6
-
-QtObject {
- property int test: external_script_func();
- property bool test2: is_a_undefined();
-
- // Disconnected scripts
- Script {
- source: "externalScript.js"
- }
-
- Script {
- source: "externalScript.2.js"
- }
-}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js
deleted file mode 100644
index 8928652..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var a = 92;
-
-function external_script_func() {
- return a;
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml
index 4aca111..a893fb0 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
function myFunction() {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
index 93054f8..e3b29ae 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
objectProperty: if(1) otherObject
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
index 5ae8b14..4746f3f 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
objectProperty: otherObject
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml
index 4128c92..fb4fa4d 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int test
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml
index 9e8408f..a945a16 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "libraryScriptAssert.js" as Test
QtObject {
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
index 216e916..3ba4183 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
index e6d31c7..697530f 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test: children
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml
index 79efc50..269bd83 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
function testFunction() { return 19; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml
index aac711c..2ea9cdb 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
MethodsObject {
function testFunction2() { return 17; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml
index 5ba324a..0065add 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property alias blah: item.x
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml
index 7da09e4..a8cb50e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string test: thing.stringProperty
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml
index a762d6d..8be2d5b 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml
index a52c772..daa9b0b 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml
index 1bf0b81..11472a0 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property QtObject test
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
index edcd340..4b51109 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml
index 72edf6e..231c9e5 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
Component.onCompleted: { var a = getObject(); a = null; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
index c66f071..bef40fd 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml
index 5897e2a..22c4f0b 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int test: getObjects().length
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml
index 8e5aa0b..d4d7eb2 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml
@@ -1,13 +1,11 @@
-import Qt 4.6
+import Qt 4.7
Item {
property int a: 0
property int b: 0
- Script {
- function b() { return 11; }
- function c() { return 33; }
- }
+ function b() { return 11; }
+ function c() { return 33; }
QtObject {
id: a
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
index 4ad7f34..4395ba3 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml
index cccd3d3..7f895ff 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
@@ -7,21 +7,17 @@ Item {
property int binding: a
property string binding2: a + "Test"
property int binding3: myFunction()
- property int binding4: myNestedFunction()
+ property int binding4: nestedObject.myNestedFunction()
- Script {
- function myFunction() {
- return a;
- }
+ function myFunction() {
+ return a;
}
Item {
id: nestedObject
- Script {
- function myNestedFunction() {
- return a;
- }
+ function myNestedFunction() {
+ return a;
}
property int a: 2
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js
deleted file mode 100644
index c00d285..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var extVariable = 19;
-
-function extMethod()
-{
- return extVariable;
-}
-
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml
deleted file mode 100644
index feb6d16..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import Qt 4.6
-
-Item {
- Script {
- function method() {
- return 10;
- }
- }
-
- Script {
- source: "scriptAccess.js"
- }
-
- property int test1: method()
- property int test2: extMethod()
- property int test3: extVariable
-}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js
new file mode 100644
index 0000000..54284fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.js
@@ -0,0 +1,4 @@
+function testFunction() {
+ test = true;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
index 2bdd706..5d8e29e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
@@ -1,16 +1,10 @@
import Qt.test 1.0
-import Qt 4.6
-
+import Qt 4.7
+import "scriptConnect.1.js" as Script
MyQmlObject {
property bool test: false
id: root
- Script {
- function testFunction() {
- test = true;
- }
- }
-
- Component.onCompleted: root.argumentSignal.connect(testFunction);
+ Component.onCompleted: root.argumentSignal.connect(Script.testFunction);
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js
new file mode 100644
index 0000000..595c778
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.js
@@ -0,0 +1,5 @@
+function testFunction() {
+ if (this.b == 12)
+ test = true;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
index fa90918..5681907 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
@@ -1,22 +1,16 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptConnect.2.js" as Script
MyQmlObject {
property bool test: false
id: root
- Script {
- function testFunction() {
- if (this.b == 12)
- test = true;
- }
- }
-
Component.onCompleted: {
var a = new Object;
a.b = 12;
- root.argumentSignal.connect(a, testFunction);
+ root.argumentSignal.connect(a, Script.testFunction);
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
index 0d8e6ef..40d8079 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
index 3e1ff1b..0356650 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
index 3ad5cbc..661f28e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js
new file mode 100644
index 0000000..71bdd08
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.js
@@ -0,0 +1,3 @@
+function testFunction() {
+ test++;
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
index 8c35db1..36655ee 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
@@ -1,20 +1,15 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptConnect.6.js" as Script
MyQmlObject {
property int test: 0
id: root
-
- Script {
- function testFunction() {
- test++;
- }
- }
Component.onCompleted: {
- root.argumentSignal.connect(testFunction);
- root.argumentSignal.connect(testFunction);
+ root.argumentSignal.connect(Script.testFunction);
+ root.argumentSignal.connect(Script.testFunction);
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js
new file mode 100644
index 0000000..407426f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.js
@@ -0,0 +1,6 @@
+function testFunction() {
+ test++;
+}
+
+function otherFunction() {
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
index 45c4f73..0cb4d79 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
@@ -1,18 +1,13 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptDisconnect.1.js" as Script
MyQmlObject {
property int test: 0
id: root
- Script {
- function testFunction() {
- test++;
- }
- }
+ Component.onCompleted: root.argumentSignal.connect(Script.testFunction);
- Component.onCompleted: root.argumentSignal.connect(testFunction);
-
- onBasicSignal: root.argumentSignal.disconnect(testFunction);
+ onBasicSignal: root.argumentSignal.disconnect(Script.testFunction);
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
index a47fe74..05ca7a4 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
@@ -1,19 +1,14 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptDisconnect.1.js" as Script
MyQmlObject {
property int test: 0
id: root
- Script {
- function testFunction() {
- test++;
- }
- }
+ Component.onCompleted: root.argumentSignal.connect(root, Script.testFunction);
- Component.onCompleted: root.argumentSignal.connect(root, testFunction);
-
- onBasicSignal: root.argumentSignal.disconnect(root, testFunction);
+ onBasicSignal: root.argumentSignal.disconnect(root, Script.testFunction);
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
index c95ffbf..2a66bed 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
@@ -1,19 +1,14 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptDisconnect.1.js" as Script
MyQmlObject {
property int test: 0
id: root
- Script {
- function testFunction() {
- test++;
- }
- }
+ Component.onCompleted: root.argumentSignal.connect(root, Script.testFunction);
- Component.onCompleted: root.argumentSignal.connect(root, testFunction);
-
- onBasicSignal: root.argumentSignal.disconnect(testFunction);
+ onBasicSignal: root.argumentSignal.disconnect(Script.testFunction);
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
index 342f24a..7beb84e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
@@ -1,20 +1,13 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
+import "scriptDisconnect.1.js" as Script
MyQmlObject {
property int test: 0
id: root
- Script {
- function testFunction() {
- test++;
- }
- function otherFunction() {
- }
- }
+ Component.onCompleted: root.argumentSignal.connect(Script.testFunction);
- Component.onCompleted: root.argumentSignal.connect(testFunction);
-
- onBasicSignal: root.argumentSignal.disconnect(otherFunction);
+ onBasicSignal: root.argumentSignal.disconnect(Script.otherFunction);
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js
index 1d7b357..d22f623 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js
@@ -1,2 +1,4 @@
// Comment
a = 10
+
+function getValue() { a = 10; return 0; }
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml
index c2edb41..e8f7b62 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml
@@ -1,11 +1,9 @@
import Qt.test 1.0
+import "scriptErrors.js" as Script
MyQmlObject {
- Script { source: "scriptErrors.js" }
- Script { function getValue() { a = 10; return 0; } }
-
property int t: a.value
- property int w: getValue();
+ property int w: Script.getValue();
property int x: undefinedObject
property int y: (a.value, undefinedObject)
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml
deleted file mode 100644
index 9b11fa9..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import Qt.test 1.0
-
-MyQmlObject {
- property string result
-
- Script{
- function f() {
- result = b
- }
-
- }
- onArgumentSignal: f()
-}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml
deleted file mode 100644
index ec727e2..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import Qt.test 1.0
-
-MyQmlObject {
- property string result
- property string aProp: "hello"
-
- Script{
- source: "scriptScope.js"
- }
- onBasicSignal: f()
-}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js
deleted file mode 100644
index 5689930..0000000
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var aProp = "world";
-
-function f() {
- result = aProp;
-}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml
index 5a19639..823096b 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property int test: myObject.object.a
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml
index 7d419cd..a2fb4d0 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property real base: 50
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml b/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml
index b9e455d..ec49a95 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test1: (a === true)
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
index bd23544..26d9596 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant obj: nested
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml
index 5488e1a..46e18e5 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool runTest: false
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
index 0d07055..154ff4d 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
@@ -72,6 +72,14 @@ private:
int m_value;
};
+class DefaultPropertyExtensionObject : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("DefaultProperty", "firstProperty")
+public:
+ DefaultPropertyExtensionObject(QObject *parent) : QObject(parent) {}
+};
+
void registerTypes()
{
qmlRegisterType<MyQmlObject>("Qt.test", 1,0, "MyQmlObject");
@@ -81,6 +89,8 @@ void registerTypes()
qmlRegisterExtendedType<MyExtendedObject, ExtensionObject>("Qt.test", 1,0, "MyExtendedObject");
qmlRegisterType<MyTypeObject>("Qt.test", 1,0, "MyTypeObject");
qmlRegisterType<NumberAssignment>("Qt.test", 1,0, "NumberAssignment");
+ qmlRegisterExtendedType<DefaultPropertyExtendedObject, DefaultPropertyExtensionObject>("Qt.test", 1,0, "DefaultPropertyExtendedObject");
+ qmlRegisterType<OverrideDefaultPropertyObject>("Qt.test", 1,0, "OverrideDefaultPropertyObject");
}
#include "testtypes.moc"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index 4424419..1381d57 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -170,7 +170,6 @@ private:
};
QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(MyQmlObject);
class MyQmlContainer : public QObject
{
@@ -185,7 +184,6 @@ private:
QList<MyQmlObject*> m_children;
};
-QML_DECLARE_TYPE(MyQmlContainer);
class MyExpression : public QDeclarativeExpression
{
@@ -258,7 +256,6 @@ private:
QObject *m_object;
QObject *m_object2;
};
-QML_DECLARE_TYPE(MyDeferredObject);
class MyBaseExtendedObject : public QObject
{
@@ -273,7 +270,6 @@ public:
private:
int m_value;
};
-QML_DECLARE_TYPE(MyBaseExtendedObject);
class MyExtendedObject : public MyBaseExtendedObject
{
@@ -288,7 +284,6 @@ public:
private:
int m_value;
};
-QML_DECLARE_TYPE(MyExtendedObject);
class MyTypeObject : public QObject
{
@@ -555,7 +550,6 @@ signals:
void rectPropertyChanged();
};
Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags)
-QML_DECLARE_TYPE(MyTypeObject);
Q_DECLARE_METATYPE(QScriptValue);
class MyInvokableObject : public QObject
@@ -665,6 +659,31 @@ public:
void setTest12(unsigned int v) { _test12 = v; }
};
+class DefaultPropertyExtendedObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QObject *firstProperty READ firstProperty WRITE setFirstProperty)
+ Q_PROPERTY(QObject *secondProperty READ secondProperty WRITE setSecondProperty)
+public:
+ DefaultPropertyExtendedObject(QObject *parent = 0) : QObject(parent), m_firstProperty(0), m_secondProperty(0) {}
+
+ QObject *firstProperty() const { return m_firstProperty; }
+ QObject *secondProperty() const { return m_secondProperty; }
+ void setFirstProperty(QObject *property) { m_firstProperty = property; }
+ void setSecondProperty(QObject *property) { m_secondProperty = property; }
+private:
+ QObject* m_firstProperty;
+ QObject* m_secondProperty;
+};
+
+class OverrideDefaultPropertyObject : public DefaultPropertyExtendedObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("DefaultProperty", "secondProperty")
+public:
+ OverrideDefaultPropertyObject() {}
+};
+
void registerTypes();
#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 098ac36..6939290 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -90,6 +90,7 @@ private slots:
void objectPropertiesTriggerReeval();
void deferredProperties();
void extensionObjects();
+ void overrideExtensionProperties();
void attachedProperties();
void enums();
void valueTypeFunctions();
@@ -100,7 +101,6 @@ private slots:
void scope();
void signalParameterTypes();
void objectsCompareAsEqual();
- void scriptAccess();
void dynamicCreation_data();
void dynamicCreation();
void dynamicDestruction();
@@ -117,14 +117,12 @@ private slots:
void exceptionBindingProducesWarning();
void transientErrors();
void shutdownErrors();
- void externalScript();
void compositePropertyType();
void jsObject();
void undefinedResetsProperty();
void listToVariant();
void multiEngineObject();
void deletedObject();
- void scriptScope();
void attachedPropertyScope();
void scriptConnect();
void scriptDisconnect();
@@ -143,6 +141,7 @@ private slots:
void variantsAssignedUndefined();
void qtbug_9792();
void noSpuriousWarningsAtShutdown();
+ void canAssignNullToQObject();
void callQtInvokables();
private:
@@ -320,7 +319,7 @@ void tst_qdeclarativeecmascript::methods()
void tst_qdeclarativeecmascript::bindingLoop()
{
QDeclarativeComponent component(&engine, TEST_FILE("bindingLoop.qml"));
- QString warning = "QML MyQmlObject (" + component.url().toString() + ":9:9) Binding loop detected for property \"stringProperty\"";
+ QString warning = component.url().toString() + ":9:9: QML MyQmlObject: Binding loop detected for property \"stringProperty\"";
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
QObject *object = component.create();
QVERIFY(object != 0);
@@ -568,6 +567,16 @@ void tst_qdeclarativeecmascript::extensionObjects()
}
+void tst_qdeclarativeecmascript::overrideExtensionProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("extensionObjectsPropertyOverride.qml"));
+ OverrideDefaultPropertyObject *object =
+ qobject_cast<OverrideDefaultPropertyObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->secondProperty() != 0);
+ QVERIFY(object->firstProperty() == 0);
+}
+
void tst_qdeclarativeecmascript::attachedProperties()
{
QDeclarativeComponent component(&engine, TEST_FILE("attachedProperty.qml"));
@@ -837,24 +846,6 @@ void tst_qdeclarativeecmascript::aliasPropertyAndBinding()
QCOMPARE(object->property("c3").toInt(), 19);
}
-/*
-Tests that only methods of Script {} blocks are exposed.
-*/
-void tst_qdeclarativeecmascript::scriptAccess()
-{
- QDeclarativeComponent component(&engine, TEST_FILE("scriptAccess.qml"));
-
- QString warning = component.url().toString() + ":16: Unable to assign [undefined] to int";
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
-
- QObject *object = component.create();
- QVERIFY(object != 0);
-
- QCOMPARE(object->property("test1").toInt(), 10);
- QCOMPARE(object->property("test2").toInt(), 19);
- QCOMPARE(object->property("test3").toInt(), 0);
-}
-
void tst_qdeclarativeecmascript::dynamicCreation_data()
{
QTest::addColumn<QString>("method");
@@ -977,13 +968,13 @@ void tst_qdeclarativeecmascript::scriptErrors()
QString url = component.url().toString();
QString warning1 = url.left(url.length() - 3) + "js:2: Error: Invalid write to global property \"a\"";
- QString warning2 = url + ":7: TypeError: Result of expression 'a' [undefined] is not an object.";
- QString warning3 = url + ":5: Error: Invalid write to global property \"a\"";
- QString warning4 = url + ":12: TypeError: Result of expression 'a' [undefined] is not an object.";
- QString warning5 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
- QString warning6 = url + ":9: Unable to assign [undefined] to int";
- QString warning7 = url + ":14: Error: Cannot assign to read-only property \"trueProperty\"";
- QString warning8 = url + ":15: Error: Cannot assign to non-existent property \"fakeProperty\"";
+ QString warning2 = url + ":5: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning3 = url.left(url.length() - 3) + "js:4: Error: Invalid write to global property \"a\"";
+ QString warning4 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning5 = url + ":8: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning6 = url + ":7: Unable to assign [undefined] to int";
+ QString warning7 = url + ":12: Error: Cannot assign to read-only property \"trueProperty\"";
+ QString warning8 = url + ":13: Error: Cannot assign to non-existent property \"fakeProperty\"";
QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData());
QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData());
@@ -1166,53 +1157,6 @@ void tst_qdeclarativeecmascript::shutdownErrors()
QCOMPARE(transientErrorsMsgCount, 0);
}
-// Check that Script::source property works as expected
-void tst_qdeclarativeecmascript::externalScript()
-{
- {
- QDeclarativeComponent component(&engine, TEST_FILE("externalScript.1.qml"));
- QObject *object = component.create();
- QVERIFY(object != 0);
-
- QCOMPARE(object->property("test").toInt(), 92);
-
- delete object;
- }
-
- {
- QDeclarativeComponent component(&engine, TEST_FILE("externalScript.2.qml"));
- QObject *object = component.create();
- QVERIFY(object != 0);
-
- QCOMPARE(object->property("test").toInt(), 92);
-
- delete object;
- }
-
- {
- QDeclarativeComponent component(&engine, TEST_FILE("externalScript.3.qml"));
- QObject *object = component.create();
- QVERIFY(object != 0);
-
- QCOMPARE(object->property("test").toInt(), 92);
- QCOMPARE(object->property("test2").toInt(), 92);
- QCOMPARE(object->property("test3").toBool(), false);
-
- delete object;
- }
-
- {
- QDeclarativeComponent component(&engine, TEST_FILE("externalScript.4.qml"));
- QObject *object = component.create();
- QVERIFY(object != 0);
-
- QCOMPARE(object->property("test").toInt(), 92);
- QCOMPARE(object->property("test2").toBool(), true);
-
- delete object;
- }
-}
-
void tst_qdeclarativeecmascript::compositePropertyType()
{
QDeclarativeComponent component(&engine, TEST_FILE("compositePropertyType.qml"));
@@ -1764,37 +1708,11 @@ void tst_qdeclarativeecmascript::deletedObject()
QCOMPARE(object->property("test1").toBool(), true);
QCOMPARE(object->property("test2").toBool(), true);
QCOMPARE(object->property("test3").toBool(), true);
- QEXPECT_FAIL("", "QTBUG-8077", Continue);
QCOMPARE(object->property("test4").toBool(), true);
delete object;
}
-void tst_qdeclarativeecmascript::scriptScope()
-{
- {
- QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.1.qml"));
-
- MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
- QVERIFY(object != 0);
- emit object->argumentSignal(19, "Hello world!", 10.3);
- QCOMPARE(object->property("result").toString(), QString());
-
- delete object;
- }
-
- {
- QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.2.qml"));
-
- MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
- QVERIFY(object != 0);
- emit object->basicSignal();
- QCOMPARE(object->property("result").toString(), QLatin1String("world"));
-
- delete object;
- }
-}
-
void tst_qdeclarativeecmascript::attachedPropertyScope()
{
QDeclarativeComponent component(&engine, TEST_FILE("attachedPropertyScope.qml"));
@@ -2273,6 +2191,35 @@ void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown()
}
}
+void tst_qdeclarativeecmascript::canAssignNullToQObject()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("canAssignNullToQObject.1.qml"));
+
+ MyQmlObject *o = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(o != 0);
+
+ QVERIFY(o->objectProperty() != 0);
+
+ o->setProperty("runTest", true);
+
+ QVERIFY(o->objectProperty() == 0);
+
+ delete o;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("canAssignNullToQObject.2.qml"));
+
+ MyQmlObject *o = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(o != 0);
+
+ QVERIFY(o->objectProperty() == 0);
+
+ delete o;
+ }
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
index 5d8a52d..ee320aa 100644
--- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -63,6 +63,8 @@ private slots:
void contextForObject();
void offlineStoragePath();
void clearComponentCache();
+ void outputWarningsToStandardError();
+ void objectOwnership();
};
void tst_qdeclarativeengine::rootContext()
@@ -101,6 +103,7 @@ void tst_qdeclarativeengine::networkAccessManager()
engine = new QDeclarativeEngine;
NetworkAccessManagerFactory factory;
engine->setNetworkAccessManagerFactory(&factory);
+ QVERIFY(engine->networkAccessManagerFactory() == &factory);
QVERIFY(engine->networkAccessManager() == factory.manager);
delete engine;
}
@@ -235,6 +238,89 @@ void tst_qdeclarativeengine::clearComponentCache()
}
}
+static QStringList warnings;
+static void msgHandler(QtMsgType, const char *warning)
+{
+ warnings << QString::fromUtf8(warning);
+}
+
+void tst_qdeclarativeengine::outputWarningsToStandardError()
+{
+ QDeclarativeEngine engine;
+
+ QCOMPARE(engine.outputWarningsToStandardError(), true);
+
+ QDeclarativeComponent c(&engine);
+ c.setData("import Qt 4.7; QtObject { property int a: undefined }", QUrl());
+
+ QVERIFY(c.isReady() == true);
+
+ warnings.clear();
+ QtMsgHandler old = qInstallMsgHandler(msgHandler);
+
+ QObject *o = c.create();
+
+ qInstallMsgHandler(old);
+
+ QVERIFY(o != 0);
+ delete o;
+
+ QCOMPARE(warnings.count(), 1);
+ QCOMPARE(warnings.at(0), QLatin1String("<Unknown File>:1: Unable to assign [undefined] to int"));
+ warnings.clear();
+
+
+ engine.setOutputWarningsToStandardError(false);
+ QCOMPARE(engine.outputWarningsToStandardError(), false);
+
+
+ old = qInstallMsgHandler(msgHandler);
+
+ o = c.create();
+
+ qInstallMsgHandler(old);
+
+ QVERIFY(o != 0);
+ delete o;
+
+ QCOMPARE(warnings.count(), 0);
+}
+
+void tst_qdeclarativeengine::objectOwnership()
+{
+ {
+ QCOMPARE(QDeclarativeEngine::objectOwnership(0), QDeclarativeEngine::CppOwnership);
+ QDeclarativeEngine::setObjectOwnership(0, QDeclarativeEngine::JavaScriptOwnership);
+ QCOMPARE(QDeclarativeEngine::objectOwnership(0), QDeclarativeEngine::CppOwnership);
+ }
+
+ {
+ QObject o;
+ QCOMPARE(QDeclarativeEngine::objectOwnership(&o), QDeclarativeEngine::CppOwnership);
+ QDeclarativeEngine::setObjectOwnership(&o, QDeclarativeEngine::JavaScriptOwnership);
+ QCOMPARE(QDeclarativeEngine::objectOwnership(&o), QDeclarativeEngine::JavaScriptOwnership);
+ QDeclarativeEngine::setObjectOwnership(&o, QDeclarativeEngine::CppOwnership);
+ QCOMPARE(QDeclarativeEngine::objectOwnership(&o), QDeclarativeEngine::CppOwnership);
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine);
+ c.setData("import Qt 4.7; QtObject { property QtObject object: QtObject {} }", QUrl());
+
+ QObject *o = c.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(QDeclarativeEngine::objectOwnership(o), QDeclarativeEngine::CppOwnership);
+
+ QObject *o2 = qvariant_cast<QObject *>(o->property("object"));
+ QCOMPARE(QDeclarativeEngine::objectOwnership(o2), QDeclarativeEngine::JavaScriptOwnership);
+
+ delete o;
+ }
+
+}
+
QTEST_MAIN(tst_qdeclarativeengine)
#include "tst_qdeclarativeengine.moc"
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml
index 8a1843c..45272e3 100644
--- a/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flickable {
}
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml
index 4b82d5c..2550fcc 100644
--- a/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flickable {
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml
index 49eed5a..27fe653 100644
--- a/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flickable {
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml
index 40c4606..aa156ed 100644
--- a/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml
@@ -1,9 +1,9 @@
-import Qt 4.6
+import Qt 4.7
Flickable {
width: 100; height: 100
contentWidth: column.width; contentHeight: column.height
- pressDelay: 200; overShoot: false; interactive: false
+ pressDelay: 200; boundsBehavior: Flickable.StopAtBounds; interactive: false
maximumFlickVelocity: 2000
Column {
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index a345a60..9ce9c49 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -57,7 +57,7 @@ private slots:
void horizontalViewportSize();
void verticalViewportSize();
void properties();
- void overShoot();
+ void boundsBehavior();
void maximumFlickVelocity();
void flickDeceleration();
void pressDelay();
@@ -88,7 +88,7 @@ void tst_qdeclarativeflickable::create()
QCOMPARE(obj->verticalVelocity(), 0.);
QCOMPARE(obj->isInteractive(), true);
- QCOMPARE(obj->overShoot(), true);
+ QCOMPARE(obj->boundsBehavior(), QDeclarativeFlickable::DragAndOvershootBounds);
QCOMPARE(obj->pressDelay(), 0);
QCOMPARE(obj->maximumFlickVelocity(), 2000.);
@@ -137,34 +137,40 @@ void tst_qdeclarativeflickable::properties()
QVERIFY(obj != 0);
QCOMPARE(obj->isInteractive(), false);
- QCOMPARE(obj->overShoot(), false);
+ QCOMPARE(obj->boundsBehavior(), QDeclarativeFlickable::StopAtBounds);
QCOMPARE(obj->pressDelay(), 200);
QCOMPARE(obj->maximumFlickVelocity(), 2000.);
delete obj;
}
-void tst_qdeclarativeflickable::overShoot()
+void tst_qdeclarativeflickable::boundsBehavior()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.7; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { boundsBehavior: Flickable.StopAtBounds }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
- QSignalSpy spy(flickable, SIGNAL(overShootChanged()));
+ QSignalSpy spy(flickable, SIGNAL(boundsBehaviorChanged()));
QVERIFY(flickable);
- QVERIFY(!flickable->overShoot());
+ QVERIFY(flickable->boundsBehavior() == QDeclarativeFlickable::StopAtBounds);
- flickable->setOverShoot(true);
- QVERIFY(flickable->overShoot());
+ flickable->setBoundsBehavior(QDeclarativeFlickable::DragAndOvershootBounds);
+ QVERIFY(flickable->boundsBehavior() == QDeclarativeFlickable::DragAndOvershootBounds);
QCOMPARE(spy.count(),1);
- flickable->setOverShoot(true);
+ flickable->setBoundsBehavior(QDeclarativeFlickable::DragAndOvershootBounds);
QCOMPARE(spy.count(),1);
- flickable->setOverShoot(false);
- QVERIFY(!flickable->overShoot());
+ flickable->setBoundsBehavior(QDeclarativeFlickable::DragOverBounds);
+ QVERIFY(flickable->boundsBehavior() == QDeclarativeFlickable::DragOverBounds);
QCOMPARE(spy.count(),2);
- flickable->setOverShoot(false);
+ flickable->setBoundsBehavior(QDeclarativeFlickable::DragOverBounds);
QCOMPARE(spy.count(),2);
+
+ flickable->setBoundsBehavior(QDeclarativeFlickable::StopAtBounds);
+ QVERIFY(flickable->boundsBehavior() == QDeclarativeFlickable::StopAtBounds);
+ QCOMPARE(spy.count(),3);
+ flickable->setBoundsBehavior(QDeclarativeFlickable::StopAtBounds);
+ QCOMPARE(spy.count(),3);
}
void tst_qdeclarativeflickable::maximumFlickVelocity()
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
index ad40bf0..fb369a6 100644
--- a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
+++ b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flipable {
transform: Rotation {
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml
index f6f2014..41463fe 100644
--- a/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml
+++ b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
Flipable {
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml
index 21d356d..5ddf09d 100644
--- a/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml
+++ b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flipable {
id: flipable
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index 4155edb..f32cdbd 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -103,11 +103,11 @@ void tst_qdeclarativeflipable::setFrontAndBack()
QVERIFY(obj->front() != 0);
QVERIFY(obj->back() != 0);
- QString message = "QML Flipable (" + c.url().toString() + ":3:1) front is a write-once property";
+ QString message = c.url().toString() + ":3:1: QML Flipable: front is a write-once property";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
obj->setFront(new QDeclarativeRectangle());
- message = "QML Flipable (" + c.url().toString() + ":3:1) back is a write-once property";
+ message = c.url().toString() + ":3:1: QML Flipable: back is a write-once property";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
obj->setBack(new QDeclarativeRectangle());
delete obj;
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml
new file mode 100644
index 0000000..5904fd6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml
@@ -0,0 +1,81 @@
+import Qt 4.7
+
+Rectangle {
+ width: 800; height: 600
+
+ FocusScope {
+ focus: true
+
+ FocusScope {
+ id: firstScope
+ focus: true
+
+ Rectangle {
+ objectName: "item0"
+ height: 120; width: 420
+
+ color: "transparent"
+ border.width: 5; border.color: firstScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ id: item1; objectName: "item1"
+ x: 10; y: 10; width: 100; height: 100; color: "green"
+ border.width: 5; border.color: wantsFocus?"blue":"black"
+ focus: true
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+ Rectangle {
+ id: item2; objectName: "item2"
+ x: 310; y: 10; width: 100; height: 100; color: "green"
+ border.width: 5; border.color: wantsFocus?"blue":"black"
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ }
+
+ FocusScope {
+ id: secondScope
+
+ Rectangle {
+ objectName: "item3"
+ y: 160; height: 120; width: 420
+
+ color: "transparent"
+ border.width: 5; border.color: secondScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ id: item4; objectName: "item4"
+ x: 10; y: 10; width: 100; height: 100; color: "green"
+ border.width: 5; border.color: wantsFocus?"blue":"black"
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+ Rectangle {
+ id: item5; objectName: "item5"
+ x: 310; y: 10; width: 100; height: 100; color: "green"
+ border.width: 5; border.color: wantsFocus?"blue":"black"
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ }
+ }
+ Keys.onDigit4Pressed: item4.focus = true
+ Keys.onDigit5Pressed: item5.forceFocus()
+}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
index 647e5bf..6b09c29 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
@@ -20,7 +20,7 @@ Rectangle {
color: "transparent"
border.width: 5
- //border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.wantsFocus?"blue":"black"
Rectangle {
id: item1; objectName: "item1"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
index 277fda4..216277e 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
index 9344d07..2ac0d18 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
index d8bd390..8862b39 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
@@ -19,7 +19,7 @@ Rectangle {
color: "transparent"
border.width: 5
- //border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.wantsFocus?"blue":"black"
Rectangle {
id: item1; objectName: "item1"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
index da452cf..d67ec57 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
@@ -20,7 +20,7 @@ Rectangle {
color: "transparent"
border.width: 5
- //border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.wantsFocus?"blue":"black"
Rectangle {
x: 10; y: 10
diff --git a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
index 1bd8331..04bb1c5 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
+++ b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
@@ -63,6 +63,7 @@ private slots:
void nested();
void noFocus();
void textEdit();
+ void forceFocus();
};
/*
@@ -273,6 +274,62 @@ void tst_qdeclarativefocusscope::textEdit()
delete view;
}
+void tst_qdeclarativefocusscope::forceFocus()
+{
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(QUrl::fromLocalFile(SRCDIR "/data/forcefocus.qml"));
+
+ QDeclarativeRectangle *item0 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item0"));
+ QDeclarativeRectangle *item1 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item1"));
+ QDeclarativeRectangle *item2 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item2"));
+ QDeclarativeRectangle *item3 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item3"));
+ QDeclarativeRectangle *item4 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item4"));
+ QDeclarativeRectangle *item5 = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("item5"));
+ QVERIFY(item0 != 0);
+ QVERIFY(item1 != 0);
+ QVERIFY(item2 != 0);
+ QVERIFY(item3 != 0);
+ QVERIFY(item4 != 0);
+ QVERIFY(item5 != 0);
+
+ view->show();
+ qApp->setActiveWindow(view);
+ qApp->processEvents();
+
+#ifdef Q_WS_X11
+ // to be safe and avoid failing setFocus with window managers
+ qt_x11_wait_for_window_manager(view);
+#endif
+
+ QVERIFY(view->hasFocus());
+ QVERIFY(view->scene()->hasFocus());
+ QVERIFY(item0->wantsFocus() == true);
+ QVERIFY(item1->hasFocus() == true);
+ QVERIFY(item2->hasFocus() == false);
+ QVERIFY(item3->wantsFocus() == false);
+ QVERIFY(item4->hasFocus() == false);
+ QVERIFY(item5->hasFocus() == false);
+
+ QTest::keyClick(view, Qt::Key_4);
+ QVERIFY(item0->wantsFocus() == true);
+ QVERIFY(item1->hasFocus() == true);
+ QVERIFY(item2->hasFocus() == false);
+ QVERIFY(item3->wantsFocus() == false);
+ QVERIFY(item4->hasFocus() == false);
+ QVERIFY(item5->hasFocus() == false);
+
+ QTest::keyClick(view, Qt::Key_5);
+ QVERIFY(item0->wantsFocus() == false);
+ QVERIFY(item1->hasFocus() == false);
+ QVERIFY(item2->hasFocus() == false);
+ QVERIFY(item3->wantsFocus() == true);
+ QVERIFY(item4->hasFocus() == false);
+ QVERIFY(item5->hasFocus() == true);
+
+ delete view;
+}
+
+
QTEST_MAIN(tst_qdeclarativefocusscope)
#include "tst_qdeclarativefocusscope.moc"
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index 5cdc96c..36908d9 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -121,7 +121,7 @@ void tst_qdeclarativefontloader::localFont()
void tst_qdeclarativefontloader::failLocalFont()
{
QString componentStr = "import Qt 4.7\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
- QTest::ignoreMessage(QtWarningMsg, QString("Cannot load font: QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" ) ").toUtf8().constData());
+ QTest::ignoreMessage(QtWarningMsg, QString("file::2:1: QML FontLoader: Cannot load font: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\"").toUtf8().constData());
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -165,7 +165,7 @@ void tst_qdeclarativefontloader::redirWebFont()
void tst_qdeclarativefontloader::failWebFont()
{
QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }";
- QTest::ignoreMessage(QtWarningMsg, "Cannot load font: QUrl( \"http://localhost:14448/nonexist.ttf\" ) ");
+ QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML FontLoader: Cannot load font: \"http://localhost:14448/nonexist.ttf\"");
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
index d3cdcd8..9c3c847 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
index e45c4c3..2fe173f 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml
index cc3e549..9331243 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property int current: grid.currentIndex
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
index a061ae2..3d826dd 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
index 62b5bd3..772255d 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
GridView {
anchors.fill: parent
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml
index b133d55..f108e3d 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
GridView {
anchors.fill: parent
diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
index 5ce758d..8e4e178 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 360; height: 120; color: "white"
diff --git a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
index b272d58..93ef69b 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200
diff --git a/tests/auto/declarative/qdeclarativeimage/data/green.png b/tests/auto/declarative/qdeclarativeimage/data/green.png
new file mode 100644
index 0000000..0a2e153
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/green.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/tiling.qml b/tests/auto/declarative/qdeclarativeimage/data/tiling.qml
new file mode 100644
index 0000000..32839bb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/tiling.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+Rectangle {
+ width: 800; height: 600
+
+ Image {
+ objectName: "vTiling"; height: 550; width: 200
+ source: "green.png"; fillMode: Image.TileVertically
+ }
+
+ Image {
+ objectName: "hTiling"; x: 225; height: 250; width: 550
+ source: "green.png"; fillMode: Image.TileHorizontally
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 854bcdd..73aefaf 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -51,6 +51,7 @@
#include <private/qdeclarativeimagebase_p.h>
#include <private/qdeclarativeloader_p.h>
#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
#include "../shared/testhttpserver.h"
@@ -86,8 +87,12 @@ private slots:
void pixmap();
void svg();
void big();
+ void tiling_QTBUG_6716();
private:
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &id, int index=-1);
+
QDeclarativeEngine engine;
};
@@ -124,13 +129,13 @@ void tst_qdeclarativeimage::imageSource_data()
QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << "";
QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << "";
QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << 0.0 << 0.0 << false
- << false << "QML Image (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
+ << false << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << 0.0 << 0.0 << false
- << true << "QML Image (file::2:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
+ << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << "";
QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << "";
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true
- << false << "QML Image (file::2:1) Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
+ << false << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
}
@@ -161,7 +166,7 @@ void tst_qdeclarativeimage::imageSource()
if (async)
QVERIFY(obj->asynchronous() == true);
-
+
if (remote || async)
TRY_WAIT(obj->status() == QDeclarativeImage::Loading);
@@ -339,6 +344,76 @@ void tst_qdeclarativeimage::big()
delete obj;
}
+void tst_qdeclarativeimage::tiling_QTBUG_6716()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/tiling.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ QDeclarativeImage *vTiling = findItem<QDeclarativeImage>(canvas->rootObject(), "vTiling");
+ QDeclarativeImage *hTiling = findItem<QDeclarativeImage>(canvas->rootObject(), "hTiling");
+
+ QVERIFY(vTiling != 0);
+ QVERIFY(hTiling != 0);
+
+ {
+ QPixmap pm(vTiling->width(), vTiling->height());
+ QPainter p(&pm);
+ vTiling->paint(&p, 0, 0);
+
+ QImage img = pm.toImage();
+ for (int x = 0; x < vTiling->width(); ++x) {
+ for (int y = 0; y < vTiling->height(); ++y) {
+ QVERIFY(img.pixel(x, y) == qRgb(0, 255, 0));
+ }
+ }
+ }
+
+ {
+ QPixmap pm(hTiling->width(), hTiling->height());
+ QPainter p(&pm);
+ hTiling->paint(&p, 0, 0);
+
+ QImage img = pm.toImage();
+ for (int x = 0; x < hTiling->width(); ++x) {
+ for (int y = 0; y < hTiling->height(); ++y) {
+ QVERIFY(img.pixel(x, y) == qRgb(0, 255, 0));
+ }
+ }
+ }
+}
+
+/*
+ Find an item with the specified objectName. If index is supplied then the
+ item must also evaluate the {index} expression equal to index
+*/
+template<typename T>
+T *tst_qdeclarativeimage::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeExpression e(qmlContext(item), "index", item);
+ if (e.value().toInt() == index)
+ return static_cast<T*>(item);
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
QTEST_MAIN(tst_qdeclarativeimage)
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index aca951b..cc4ec20 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -96,9 +96,9 @@ void tst_qdeclarativeimageprovider::imageSource_data()
QTest::newRow("exists") << "image://test/exists.png" << "" << QSize(100,100) << "";
QTest::newRow("scaled") << "image://test/exists.png" << "sourceSize: \"80x30\"" << QSize(80,30) << "";
QTest::newRow("missing") << "image://test/no-such-file.png" << "" << QSize()
- << "QML Image (file::2:1) Failed to get image from provider: image://test/no-such-file.png";
+ << "file::2:1: QML Image: Failed to get image from provider: image://test/no-such-file.png";
QTest::newRow("unknown provider") << "image://bogus/exists.png" << "" << QSize()
- << "QML Image (file::2:1) Failed to get image from provider: image://bogus/exists.png";
+ << "file::2:1: QML Image: Failed to get image from provider: image://bogus/exists.png";
}
@@ -158,7 +158,7 @@ void tst_qdeclarativeimageprovider::removeProvider()
QCOMPARE(obj->width(), 100.0);
// remove the provider and confirm
- QString error("QML Image (file::2:1) Failed to get image from provider: image://test2/exists2.png");
+ QString error("file::2:1: QML Image: Failed to get image from provider: image://test2/exists2.png");
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
index 548e498..30e8274 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant nested
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
index eac0b73..9bd8571 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant nested
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
index 176636a..9bb6be7 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant nested
diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
index aa3f03b..36db448 100644
--- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
+++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
@@ -75,14 +75,14 @@ void tst_qdeclarativeinfo::qmlObject()
QObject *object = component.create();
QVERIFY(object != 0);
- QString message = "QML QObject_QML_0 (" + component.url().toString() + ":3:1) Test Message";
+ QString message = component.url().toString() + ":3:1: QML QObject_QML_0: Test Message";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(object) << "Test Message";
QObject *nested = qvariant_cast<QObject *>(object->property("nested"));
QVERIFY(nested != 0);
- message = "QML QtObject (" + component.url().toString() + ":6:13) Second Test Message";
+ message = component.url().toString() + ":6:13: QML QtObject: Second Test Message";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(nested) << "Second Test Message";
}
@@ -99,11 +99,11 @@ void tst_qdeclarativeinfo::nestedQmlObject()
QObject *nested2 = qvariant_cast<QObject *>(object->property("nested2"));
QVERIFY(nested2 != 0);
- QString message = "QML NestedObject (" + component.url().toString() + ":5:13) Outer Object";
+ QString message = component.url().toString() + ":5:13: QML NestedObject: Outer Object";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(nested) << "Outer Object";
- message = "QML QtObject (" + TEST_FILE("NestedObject.qml").toString() + ":6:14) Inner Object";
+ message = TEST_FILE("NestedObject.qml").toString() + ":6:14: QML QtObject: Inner Object";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(nested2) << "Inner Object";
}
@@ -111,17 +111,17 @@ void tst_qdeclarativeinfo::nestedQmlObject()
void tst_qdeclarativeinfo::nonQmlObject()
{
QObject object;
- QTest::ignoreMessage(QtWarningMsg, "QML QtObject (unknown location) Test Message");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML QtObject: Test Message");
qmlInfo(&object) << "Test Message";
QPushButton pbObject;
- QTest::ignoreMessage(QtWarningMsg, "QML QPushButton (unknown location) Test Message");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML QPushButton: Test Message");
qmlInfo(&pbObject) << "Test Message";
}
void tst_qdeclarativeinfo::nullObject()
{
- QTest::ignoreMessage(QtWarningMsg, "QML (unknown location) Null Object Test Message");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Null Object Test Message");
qmlInfo(0) << "Null Object Test Message";
}
@@ -130,7 +130,7 @@ void tst_qdeclarativeinfo::nonQmlContextedObject()
QObject object;
QDeclarativeContext context(&engine);
QDeclarativeEngine::setContextForObject(&object, &context);
- QTest::ignoreMessage(QtWarningMsg, "QML QtObject (unknown location) Test Message");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML QtObject: Test Message");
qmlInfo(&object) << "Test Message";
}
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index f4df130..9ae26f2 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -332,16 +332,6 @@ void tst_qdeclarativeinstruction::dump()
{
QDeclarativeInstruction i;
- i.line = 28;
- i.type = QDeclarativeInstruction::StoreScript;
- i.storeScript.value = 2;
- //i.storeScript.fileName = 18;
- //i.storeScript.lineNumber = 28;
- data->bytecode << i;
- }
-
- {
- QDeclarativeInstruction i;
i.line = 29;
i.type = QDeclarativeInstruction::StoreScriptString;
i.storeScriptString.propertyIndex = 24;
@@ -571,30 +561,29 @@ void tst_qdeclarativeinstruction::dump()
<< "25\t\t25\tSTORE_VARIANT_OBJECT\t22"
<< "26\t\t26\tSTORE_INTERFACE\t\t23"
<< "27\t\t27\tSTORE_SIGNAL\t\t2\t3\t\t\"console.log(1921)\""
- << "28\t\t28\tSTORE_SCRIPT\t\t2"
- << "29\t\t29\tSTORE_SCRIPT_STRING\t24\t3\t1"
- << "30\t\t30\tASSIGN_SIGNAL_OBJECT\t0\t\t\t\"mySignal\""
- << "31\t\t31\tASSIGN_CUSTOMTYPE\t25\t4"
- << "32\t\t32\tSTORE_BINDING\t26\t3\t2"
- << "33\t\t33\tSTORE_COMPILED_BINDING\t27\t2\t4"
- << "34\t\t34\tSTORE_VALUE_SOURCE\t29\t4"
- << "35\t\t35\tSTORE_VALUE_INTERCEPTOR\t30\t-4"
- << "36\t\t36\tBEGIN\t\t\t4"
- << "37\t\t38\tSTORE_OBJECT_QLIST"
- << "38\t\t39\tASSIGN_OBJECT_LIST"
- << "39\t\t40\tFETCH_ATTACHED\t\t23"
- << "40\t\t42\tFETCH_QLIST\t\t32"
- << "41\t\t43\tFETCH\t\t\t33"
- << "42\t\t44\tFETCH_VALUE\t\t34\t6"
- << "43\t\t45\tPOP"
- << "44\t\t46\tPOP_QLIST"
- << "45\t\t47\tPOP_VALUE\t\t35\t8"
- << "46\t\t48\tDEFER\t\t\t7"
- << "47\t\tNA\tDEFER\t\t\t7"
- << "48\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
- << "49\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
- << "50\t\t51\tSTORE_VARIANT_INTEGER\t\t32\t11"
- << "51\t\t52\tSTORE_VARIANT_DOUBLE\t\t19\t33.7"
+ << "28\t\t29\tSTORE_SCRIPT_STRING\t24\t3\t1"
+ << "29\t\t30\tASSIGN_SIGNAL_OBJECT\t0\t\t\t\"mySignal\""
+ << "30\t\t31\tASSIGN_CUSTOMTYPE\t25\t4"
+ << "31\t\t32\tSTORE_BINDING\t26\t3\t2"
+ << "32\t\t33\tSTORE_COMPILED_BINDING\t27\t2\t4"
+ << "33\t\t34\tSTORE_VALUE_SOURCE\t29\t4"
+ << "34\t\t35\tSTORE_VALUE_INTERCEPTOR\t30\t-4"
+ << "35\t\t36\tBEGIN\t\t\t4"
+ << "36\t\t38\tSTORE_OBJECT_QLIST"
+ << "37\t\t39\tASSIGN_OBJECT_LIST"
+ << "38\t\t40\tFETCH_ATTACHED\t\t23"
+ << "39\t\t42\tFETCH_QLIST\t\t32"
+ << "40\t\t43\tFETCH\t\t\t33"
+ << "41\t\t44\tFETCH_VALUE\t\t34\t6"
+ << "42\t\t45\tPOP"
+ << "43\t\t46\tPOP_QLIST"
+ << "44\t\t47\tPOP_VALUE\t\t35\t8"
+ << "45\t\t48\tDEFER\t\t\t7"
+ << "46\t\tNA\tDEFER\t\t\t7"
+ << "47\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
+ << "48\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
+ << "49\t\t51\tSTORE_VARIANT_INTEGER\t\t32\t11"
+ << "50\t\t52\tSTORE_VARIANT_DOUBLE\t\t19\t33.7"
<< "-------------------------------------------------------------------------------";
messages = QStringList();
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml
index dcd4061..5958004 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
index 08da901..87e64c5 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Grid {
columns: 2
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml
index 7d34fc8..8ff3e87 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
focus: true
diff --git a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
index 40a2106..4a92e9d 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root; objectName: "root"
diff --git a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
index 5f97408..dd86453 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Item {
diff --git a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml
index fa299be..852f242 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 4400116..d2c328e 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -385,12 +385,15 @@ void tst_QDeclarativeItem::mapCoordinates()
Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapFromScene(x, y));
- QTest::ignoreMessage(QtWarningMsg, "mapToItem() given argument \"1122\" which is neither null nor an Item");
+ QString warning1 = QUrl::fromLocalFile(SRCDIR "/data/mapCoordinates.qml").toString() + ":7:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item";
+ QString warning2 = QUrl::fromLocalFile(SRCDIR "/data/mapCoordinates.qml").toString() + ":7:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item";
+
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QVERIFY(QMetaObject::invokeMethod(root, "checkMapAToInvalid",
Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
QVERIFY(result.toBool());
- QTest::ignoreMessage(QtWarningMsg, "mapFromItem() given argument \"1122\" which is neither null nor an Item");
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
QVERIFY(QMetaObject::invokeMethod(root, "checkMapAFromInvalid",
Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
QVERIFY(result.toBool());
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml
index 55aa231..deb84a8 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
id: root
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
index f62c860..db205f1 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant other
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
index 9050c3a..04f5ba3 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property alias obj : otherObj
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml
index 573674c..80414ac 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
Alias3 {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml
index 05fbc3f..4c78cd7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml
index 99d010f..61e6146 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml
index d08f35b..0275e21 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml
index aefbf9a..9746ab0 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int super_a: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
index df8c851..23d6ed9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant child
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml
index a0706ad..8c953cb 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml
index 5155612..fdf4800 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property QtObject o1
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml
index 5cc8d20..ee02335 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
x: "You can't assign a string to a real!"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml
index 2889caf..5373959 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property int a: Math.max(10, 9)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml
index e5a7cf8..d5c6979 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
property int a: Math.max(10, 9)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml
index 500b0f6..291d47a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
id: root
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
index 0b968c2..787eb77 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant other
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
index 125c518..bbd1901 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Test 1.0
QtObject {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml
index e3af230..2d99b64 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property QtObject o;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml
index a9a57eb..4ceff3d 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property QtObject object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
index 629dd2a..5bf8702 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant other
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
index 7c072e1..b8c71e1 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant other
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml
index f6422bd..1009df7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Test 1.0
QtObject {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
index 91fd833..5af3d6e 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: 1
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
index 774762a..2b1ef76 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant a;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt
new file mode 100644
index 0000000..78aa471
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.errors.txt
@@ -0,0 +1 @@
+4:5:Invalid use of namespace
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml
new file mode 100644
index 0000000..8eb9768
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml
@@ -0,0 +1,5 @@
+import Qt 4.7 as Qt
+
+Qt.QtObject {
+ Qt: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml
index b46ec34..3a78170 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml
@@ -1,6 +1,6 @@
import Test 1.0
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
MyQmlObject.value: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml
index 07e463a..730fffd 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml
index 88e0f73..7e7dd0f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: myId
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml
index 287a959..f0d5f71 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Component {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml
index ab1e29b..521adbc 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml
index 629e998..9c3938b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
x: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml
index 2303ebf..9208722 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
id: QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt
new file mode 100644
index 0000000..b144814
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.7.errors.txt
@@ -0,0 +1 @@
+3:1:Component objects cannot declare new properties.
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml
new file mode 100644
index 0000000..b81e0c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Component {
+ property int a
+ QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt
new file mode 100644
index 0000000..6f2d0d2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.8.errors.txt
@@ -0,0 +1 @@
+3:1:Component objects cannot declare new signals.
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml
new file mode 100644
index 0000000..0b00890
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Component {
+ signal a
+ QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt
new file mode 100644
index 0000000..92f1456
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.9.errors.txt
@@ -0,0 +1 @@
+3:1:Component objects cannot declare new functions.
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml
new file mode 100644
index 0000000..c5f93c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Component {
+ function a() {}
+ QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
index e745e91..725069e 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml
index a22c776..f11abd9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
objectName: "Hello" + "World"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml
index 7cd6a83..438e8e9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int on
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml
index 00cc0c4..902b598 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
ListModel {
ListElement { a: 10 }
ListElement { id: foo; a: 12 }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml
index cf2f272..3230e49 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
ListModel {
ListElement { a: 10 }
ListElement { a: 12 }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml
index 3987a3c..c241861 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml
index 0fd1404..0cd0338 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
grouped {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml
index 3651511..b4203b5 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyContainer {
QtObject {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml
index 4eab50a..54d080a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
onDestroyed: print("Hello World!")
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt
new file mode 100644
index 0000000..1f9f916
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.errors.txt
@@ -0,0 +1 @@
+5:5:Duplicate default property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml
new file mode 100644
index 0000000..c0ed52c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ default property QtObject a
+ default property QtObject b
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt
new file mode 100644
index 0000000..7a4f63b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.errors.txt
@@ -0,0 +1 @@
+5:5:Duplicate property name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml
new file mode 100644
index 0000000..1f46b96
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ property int a
+ property bool a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt
new file mode 100644
index 0000000..c5860a2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.errors.txt
@@ -0,0 +1 @@
+3:1:Duplicate signal name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml
new file mode 100644
index 0000000..cf49062
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ signal a
+ signal a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt
new file mode 100644
index 0000000..b293c86
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.errors.txt
@@ -0,0 +1 @@
+3:1:Duplicate method name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml
new file mode 100644
index 0000000..a14ec4c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ function a() {}
+ function a() {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt
new file mode 100644
index 0000000..015d55b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.errors.txt
@@ -0,0 +1 @@
+3:1:UnknownType is not a type
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml
new file mode 100644
index 0000000..ea77cfd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml
@@ -0,0 +1,5 @@
+import Qt 4.7
+
+QtObject {
+ property UnknownType a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
index 930bf2c..a1be43a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyCustomParserType {
propa: a + 10
propb: Math.min(a, 10)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml
index c80a7c0..e870046 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml
@@ -1,6 +1,6 @@
import Test 1.0
-import Qt 4.6
-import Qt 4.6 as Qt
+import Qt 4.7
+import Qt 4.7 as Qt
QtObject {
property QtObject objectProperty
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
index 6411609..6bcae0f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
default property int intProperty : 10
property bool boolProperty: false
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml
index 7bfab67..cceb44b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
DynamicPropertiesNestedType {
property int a: 13
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml
index 2a834e8..9aa5e86 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
signal signal1
function slot1() {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
index a723269..6b5b451 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Font {
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml
index cd112af..3b80f0b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml
@@ -1,4 +1,4 @@
import Test 1.0 as Rectangle
-import Qt 4.6
+import Qt 4.7
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
index ec6aa2b..483cfec 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
@@ -1,5 +1,5 @@
// imports...
import "will-not-be-found"
-import Qt 4.6
+import Qt 4.7
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt
new file mode 100644
index 0000000..dfa7a36
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.errors.txt
@@ -0,0 +1 @@
+1:1:module "Test" version 0.1 is not installed
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml
new file mode 100644
index 0000000..18514b1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExistOlder.qml
@@ -0,0 +1,3 @@
+import Test 0.1
+
+MyTypeObject { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml
index 478f06a..1ebec1b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyContainer {
Component {
id: myComponent
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml
index 70879ff..6a47536 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyQmlObject {
interfaceProperty: MyQmlObject {}
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt
new file mode 100644
index 0000000..9848e48
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.errors.txt
@@ -0,0 +1 @@
+3:1:No property alias location
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml
new file mode 100644
index 0000000..985fb94
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml
@@ -0,0 +1,5 @@
+import Qt 4.7
+
+QtObject {
+ property alias a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt
new file mode 100644
index 0000000..3e15628
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.errors.txt
@@ -0,0 +1 @@
+4:23:Invalid alias location
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml
new file mode 100644
index 0000000..a2ac91c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ property alias a: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt
new file mode 100644
index 0000000..7260be4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt
@@ -0,0 +1 @@
+5:23:Invalid alias reference. An alias reference must be specified as <id> or <id>.<property>
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml
new file mode 100644
index 0000000..cc71753
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ id: root
+ property alias a: root.rectProperty.x
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt
new file mode 100644
index 0000000..7260be4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt
@@ -0,0 +1 @@
+5:23:Invalid alias reference. An alias reference must be specified as <id> or <id>.<property>
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml
new file mode 100644
index 0000000..cfdfca0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ id: root
+ property alias a: print("Hello!")
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt
new file mode 100644
index 0000000..6f78e59
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.errors.txt
@@ -0,0 +1 @@
+5:23:Invalid alias reference. Unable to find id "otherroot"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml
new file mode 100644
index 0000000..0c1d5d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.5.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ id: root
+ property alias a: otherroot
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt
new file mode 100644
index 0000000..93652a7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.errors.txt
@@ -0,0 +1 @@
+5:23:Invalid alias location
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml
new file mode 100644
index 0000000..edfdb24
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.6.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ id: root
+ property alias a: root.foobar
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml
index 324f79c..84d39df 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MyQmlObject.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml
index b768e9f..40e3926 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml
@@ -1,5 +1,5 @@
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
Namespace.MadeUpClass.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml
index 7b782be..28f8220 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml
@@ -1,5 +1,5 @@
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
Namespace.madeUpClass.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt
new file mode 100644
index 0000000..189a795
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.errors.txt
@@ -0,0 +1 @@
+4:13:Attached properties cannot be used here
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml
new file mode 100644
index 0000000..7de503e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.12.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ grouped.MyQmlObject.value: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt
new file mode 100644
index 0000000..46d7be2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.errors.txt
@@ -0,0 +1 @@
+5:9:Attached properties cannot be used here
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml
new file mode 100644
index 0000000..986ab85
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.13.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ grouped {
+ MyQmlObject.value: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml
index 1f47c61..f45f88f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml
@@ -1,5 +1,5 @@
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
Namespace.MyQmlObject.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml
index 79c2981..64bc8bd 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MyQmlObject: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml
index af0be80..ee3dedb 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml
@@ -1,5 +1,5 @@
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
Namespace.MyQmlObject: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml
index 0546322..66cad2d 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MyQmlObject: QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml
index 108109a..90d80bc 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
Test.MyQmlObject: QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml
index ccf0353..5293d55 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MyTypeObject.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml
index e736379..6f319c1 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml
@@ -1,5 +1,5 @@
import Test 1.0 as Namespace
-import Qt 4.6
+import Qt 4.7
QtObject {
Namespace.MyTypeObject.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml
index a095229..b7e1302 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MadeUpClass.foo: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
index 9012aa6..671f5ab 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant o;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml
index a0c8306..f897cc8 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int o;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml
index 30d88d5..00fc81b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
-import Qt 4.6 as qt
+import Qt 4.7
+import Qt 4.7 as qt
QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt
new file mode 100644
index 0000000..b4210a1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.errors.txt
@@ -0,0 +1 @@
+3:5:"MyQmlObject" cannot operate on "value"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml
new file mode 100644
index 0000000..d748bf4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidOn.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ MyQmlObject on value {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml
index 38cf6bb..6d33361 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml
@@ -1,2 +1,2 @@
-import Qt 4.6 as Qt
+import Qt 4.7 as Qt
Qt.Rectangle {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml
index a0706ad..8c953cb 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml
index d8a22a8..d09dea7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml
index 93c7630..62e41a9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Image {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt
new file mode 100644
index 0000000..35d2d35
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.errors.txt
@@ -0,0 +1 @@
+4:24:Cannot assign object to list
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml
new file mode 100644
index 0000000..6c628e4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Qt 4.7
+MyContainer {
+ containerChildren: QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml
index 32b5b6c..0393382 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
ListModel {
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml
index ba9e37c..3027722 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property list<QtObject> listProperty
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml
index d9794b4..a2d8799 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
function MyMethod() {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml
index 3bf75f6..1a417a9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
onClicked: console.log("Hello world!")
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt
new file mode 100644
index 0000000..e1f7ec5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml
new file mode 100644
index 0000000..7d03139
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.11.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ rectProperty.x: 10
+ rectProperty.x: 11
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml
index c0d755a..0aa3405 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
NestedErrorsType {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt
new file mode 100644
index 0000000..23cd3f3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt
@@ -0,0 +1 @@
+3:1:Keys is only available via attached properties
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml
new file mode 100644
index 0000000..077abe1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml
@@ -0,0 +1,4 @@
+import Qt 4.7
+
+Keys {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml
index 5725f85..71a7d26 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
// We set a and b to ensure that onCompleted is executed after bindings and
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml
index 7ebae7b..1b1eef9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
// We set a and b to ensure that onCompleted is executed after bindings and
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml
index cadc39a..b3384d4 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property blah a;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml
index e810c6c..1ba9b17 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property invalidmodifier<int> a;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml
index 04147c2..261e7e3 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property invalidmodifier<QtObject> a;
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml
index b2ec482..0a0f969 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
readonly property int a
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml
index 65fafbb..0340f79 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
readonly property int a: value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml
index f39bed3..aad9e07 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int Hello
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml
index 502eb22..0246b2f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int Hello: 10
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
index 429c327..d038ba3 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
index 0f57b61..1eab9f6 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
MyQmlObject.value: 10
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
index a4a976e..cfe255a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant child
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt
new file mode 100644
index 0000000..d857a04
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.errors.txt
@@ -0,0 +1 @@
+3:5:Invalid property assignment: "readOnlyString" is a read-only property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml
new file mode 100644
index 0000000..5338ac7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.4.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ MyPropertyValueSource on readOnlyString {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt
new file mode 100644
index 0000000..baf4766
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.errors.txt
@@ -0,0 +1 @@
+3:27:Invalid property assignment: "readOnlyEnumProperty" is a read-only property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml
new file mode 100644
index 0000000..422d13d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.5.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyTypeObject {
+ readOnlyEnumProperty: MyTypeObject.EnumValue1
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt
new file mode 100644
index 0000000..14463e0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.errors.txt
@@ -0,0 +1 @@
+4:21:Invalid property assignment: script expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml
new file mode 100644
index 0000000..f07d223
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.1.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: MyTypeObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt
new file mode 100644
index 0000000..f8a776f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.errors.txt
@@ -0,0 +1 @@
+4:40:Cannot assign multiple values to a script property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml
new file mode 100644
index 0000000..dc825c7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: [ MyTypeObject {}, MyTypeObject {} ]
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml
index fbaf017..63fd74f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
signal mySignal(nontype a)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml
index 5049192..c11ce17 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
signal mySignal(,)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml
index 9dd4cc7..771ea50 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
signal mySignal(a)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml
index 7279a46..37c938a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
signal MySignal
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml
index c4d5905..1421361 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml
index c4d5905..1421361 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt
new file mode 100644
index 0000000..77cf210
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.errors.txt
@@ -0,0 +1 @@
+4:24:Cannot assign object to property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml
new file mode 100644
index 0000000..1ddccc0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+import Qt 4.7
+MyQmlObject {
+ qmlobjectProperty: QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml
index 836c20a..d5a61ae 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Image { source: "pics/blue.png" }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml
index c4d5905..1421361 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml
@@ -1,2 +1,2 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml
index 836c20a..d5a61ae 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Image { source: "pics/blue.png" }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml
index 0ea9ec6..43aeb74 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
index 623775a..5d87404 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
@@ -52,8 +52,7 @@ void registerTypes()
qmlRegisterType<MyNamespace::MySecondNamespacedType>("Test",1,0,"MySecondNamespacedType");
qmlRegisterType<MyGroupedObject>();
- qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", "MyCustomParserType",
- new MyCustomParserTypeParser);
+ qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser);
}
QVariant myCustomVariantTypeConverter(const QString &data)
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
index 8c163a5..89f99c8 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
@@ -167,8 +167,9 @@ private:
MyCustomVariantType m_custom;
int m_propertyWithNotify;
};
+QML_DECLARE_TYPE(MyQmlObject)
QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(MyQmlObject);
+
class MyGroupedObject : public QObject
{
@@ -187,8 +188,6 @@ private:
QDeclarativeScriptString m_script;
};
-QML_DECLARE_TYPE(MyGroupedObject);
-
class MyTypeObject : public QObject
{
@@ -201,6 +200,7 @@ class MyTypeObject : public QObject
Q_PROPERTY(QDeclarativeComponent *componentProperty READ componentProperty WRITE setComponentProperty)
Q_PROPERTY(MyFlags flagProperty READ flagProperty WRITE setFlagProperty)
Q_PROPERTY(MyEnum enumProperty READ enumProperty WRITE setEnumProperty)
+ Q_PROPERTY(MyEnum readOnlyEnumProperty READ readOnlyEnumProperty)
Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty)
Q_PROPERTY(uint uintProperty READ uintProperty WRITE setUintProperty)
Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty)
@@ -274,6 +274,10 @@ public:
enumPropertyValue = v;
}
+ MyEnum readOnlyEnumProperty() const {
+ return EnumVal1;
+ }
+
QString stringPropertyValue;
QString stringProperty() const {
return stringPropertyValue;
@@ -462,28 +466,29 @@ signals:
void rectPropertyChanged();
};
Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags)
-QML_DECLARE_TYPE(MyTypeObject);
+
class MyContainer : public QObject
{
Q_OBJECT
Q_PROPERTY(QDeclarativeListProperty<QObject> children READ children)
+ Q_PROPERTY(QDeclarativeListProperty<MyContainer> containerChildren READ containerChildren)
Q_PROPERTY(QDeclarativeListProperty<MyInterface> qlistInterfaces READ qlistInterfaces)
Q_CLASSINFO("DefaultProperty", "children")
public:
MyContainer() {}
QDeclarativeListProperty<QObject> children() { return QDeclarativeListProperty<QObject>(this, m_children); }
+ QDeclarativeListProperty<MyContainer> containerChildren() { return QDeclarativeListProperty<MyContainer>(this, m_containerChildren); }
QList<QObject *> *getChildren() { return &m_children; }
QDeclarativeListProperty<MyInterface> qlistInterfaces() { return QDeclarativeListProperty<MyInterface>(this, m_interfaces); }
QList<MyInterface *> *getQListInterfaces() { return &m_interfaces; }
+ QList<MyContainer*> m_containerChildren;
QList<QObject*> m_children;
QList<MyInterface *> m_interfaces;
};
-QML_DECLARE_TYPE(MyContainer);
-
class MyPropertyValueSource : public QObject, public QDeclarativePropertyValueSource
{
@@ -499,7 +504,7 @@ public:
prop = p;
}
};
-QML_DECLARE_TYPE(MyPropertyValueSource);
+
class MyDotPropertyObject : public QObject
{
@@ -540,7 +545,6 @@ private:
bool m_ownRWObj;
};
-QML_DECLARE_TYPE(MyDotPropertyObject);
namespace MyNamespace {
class MyNamespacedType : public QObject
@@ -559,8 +563,6 @@ namespace MyNamespace {
QList<MyNamespacedType *> m_list;
};
}
-QML_DECLARE_TYPE(MyNamespace::MyNamespacedType);
-QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType);
class MyCustomParserType : public QObject
{
@@ -574,8 +576,6 @@ public:
void setCustomData(QObject *, const QByteArray &) {}
};
-QML_DECLARE_TYPE(MyCustomParserType);
-
void registerTypes();
#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 8feab32..c39e6f7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -225,11 +225,15 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("wrongType (number string for int)") << "wrongType.13.qml" << "wrongType.13.errors.txt" << false;
QTest::newRow("wrongType (int for string)") << "wrongType.14.qml" << "wrongType.14.errors.txt" << false;
QTest::newRow("wrongType (int for url)") << "wrongType.15.qml" << "wrongType.15.errors.txt" << false;
+ QTest::newRow("wrongType (invalid object)") << "wrongType.16.qml" << "wrongType.16.errors.txt" << false;
QTest::newRow("readOnly.1") << "readOnly.1.qml" << "readOnly.1.errors.txt" << false;
QTest::newRow("readOnly.2") << "readOnly.2.qml" << "readOnly.2.errors.txt" << false;
QTest::newRow("readOnly.3") << "readOnly.3.qml" << "readOnly.3.errors.txt" << false;
+ QTest::newRow("readOnly.4") << "readOnly.4.qml" << "readOnly.4.errors.txt" << false;
+ QTest::newRow("readOnly.5") << "readOnly.5.qml" << "readOnly.5.errors.txt" << false;
+ QTest::newRow("listAssignment.1") << "listAssignment.1.qml" << "listAssignment.1.errors.txt" << false;
QTest::newRow("listAssignment.2") << "listAssignment.2.qml" << "listAssignment.2.errors.txt" << false;
QTest::newRow("listAssignment.3") << "listAssignment.3.qml" << "listAssignment.3.errors.txt" << false;
@@ -243,6 +247,9 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidID.8") << "invalidID.8.qml" << "invalidID.8.errors.txt" << false;
QTest::newRow("invalidID.9") << "invalidID.9.qml" << "invalidID.9.errors.txt" << false;
+ QTest::newRow("scriptString.1") << "scriptString.1.qml" << "scriptString.1.errors.txt" << false;
+ QTest::newRow("scriptString.2") << "scriptString.2.qml" << "scriptString.2.errors.txt" << false;
+
QTest::newRow("unsupportedProperty") << "unsupportedProperty.qml" << "unsupportedProperty.errors.txt" << false;
QTest::newRow("nullDotProperty") << "nullDotProperty.qml" << "nullDotProperty.errors.txt" << true;
QTest::newRow("fakeDotProperty") << "fakeDotProperty.qml" << "fakeDotProperty.errors.txt" << false;
@@ -270,6 +277,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false;
QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false;
QTest::newRow("importNonExist (installed)") << "importNonExist.qml" << "importNonExist.errors.txt" << false;
+ QTest::newRow("importNonExistOlder (installed)") << "importNonExistOlder.qml" << "importNonExistOlder.errors.txt" << false;
QTest::newRow("importNewerVersion (installed)") << "importNewerVersion.qml" << "importNewerVersion.errors.txt" << false;
QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false;
@@ -296,6 +304,9 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("Component.4") << "component.4.qml" << "component.4.errors.txt" << false;
QTest::newRow("Component.5") << "component.5.qml" << "component.5.errors.txt" << false;
QTest::newRow("Component.6") << "component.6.qml" << "component.6.errors.txt" << false;
+ QTest::newRow("Component.7") << "component.7.qml" << "component.7.errors.txt" << false;
+ QTest::newRow("Component.8") << "component.8.qml" << "component.8.errors.txt" << false;
+ QTest::newRow("Component.9") << "component.9.qml" << "component.9.errors.txt" << false;
QTest::newRow("MultiSet.1") << "multiSet.1.qml" << "multiSet.1.errors.txt" << false;
QTest::newRow("MultiSet.2") << "multiSet.2.qml" << "multiSet.2.errors.txt" << false;
@@ -307,6 +318,20 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("MultiSet.8") << "multiSet.8.qml" << "multiSet.8.errors.txt" << false;
QTest::newRow("MultiSet.9") << "multiSet.9.qml" << "multiSet.9.errors.txt" << false;
QTest::newRow("MultiSet.10") << "multiSet.10.qml" << "multiSet.10.errors.txt" << false;
+ QTest::newRow("MultiSet.11") << "multiSet.11.qml" << "multiSet.11.errors.txt" << false;
+
+ QTest::newRow("dynamicMeta.1") << "dynamicMeta.1.qml" << "dynamicMeta.1.errors.txt" << false;
+ QTest::newRow("dynamicMeta.2") << "dynamicMeta.2.qml" << "dynamicMeta.2.errors.txt" << false;
+ QTest::newRow("dynamicMeta.3") << "dynamicMeta.3.qml" << "dynamicMeta.3.errors.txt" << false;
+ QTest::newRow("dynamicMeta.4") << "dynamicMeta.4.qml" << "dynamicMeta.4.errors.txt" << false;
+ QTest::newRow("dynamicMeta.5") << "dynamicMeta.5.qml" << "dynamicMeta.5.errors.txt" << false;
+
+ QTest::newRow("invalidAlias.1") << "invalidAlias.1.qml" << "invalidAlias.1.errors.txt" << false;
+ QTest::newRow("invalidAlias.2") << "invalidAlias.2.qml" << "invalidAlias.2.errors.txt" << false;
+ QTest::newRow("invalidAlias.3") << "invalidAlias.3.qml" << "invalidAlias.3.errors.txt" << false;
+ QTest::newRow("invalidAlias.4") << "invalidAlias.4.qml" << "invalidAlias.4.errors.txt" << false;
+ QTest::newRow("invalidAlias.5") << "invalidAlias.5.qml" << "invalidAlias.5.errors.txt" << false;
+ QTest::newRow("invalidAlias.6") << "invalidAlias.6.qml" << "invalidAlias.6.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.1") << "invalidAttachedProperty.1.qml" << "invalidAttachedProperty.1.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.2") << "invalidAttachedProperty.2.qml" << "invalidAttachedProperty.2.errors.txt" << false;
@@ -319,6 +344,8 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidAttachedProperty.9") << "invalidAttachedProperty.9.qml" << "invalidAttachedProperty.9.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.10") << "invalidAttachedProperty.10.qml" << "invalidAttachedProperty.10.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.11") << "invalidAttachedProperty.11.qml" << "invalidAttachedProperty.11.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.12") << "invalidAttachedProperty.12.qml" << "invalidAttachedProperty.12.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.13") << "invalidAttachedProperty.13.qml" << "invalidAttachedProperty.13.errors.txt" << false;
QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false;
QTest::newRow("emptySignal.2") << "emptySignal.2.qml" << "emptySignal.2.errors.txt" << false;
@@ -330,7 +357,10 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false;
QTest::newRow("objectValueTypeProperty") << "objectValueTypeProperty.qml" << "objectValueTypeProperty.errors.txt" << false;
QTest::newRow("enumTypes") << "enumTypes.qml" << "enumTypes.errors.txt" << false;
+ QTest::newRow("noCreation") << "noCreation.qml" << "noCreation.errors.txt" << false;
QTest::newRow("destroyedSignal") << "destroyedSignal.qml" << "destroyedSignal.errors.txt" << false;
+ QTest::newRow("assignToNamespace") << "assignToNamespace.qml" << "assignToNamespace.errors.txt" << false;
+ QTest::newRow("invalidOn") << "invalidOn.qml" << "invalidOn.errors.txt" << false;
}
@@ -779,8 +809,7 @@ void tst_qdeclarativelanguage::valueTypes()
QDeclarativeComponent component(&engine, TEST_FILE("valueTypes.qml"));
VERIFY_ERRORS(0);
- QString message = QLatin1String("QML MyTypeObject (") + component.url().toString() +
- QLatin1String(":2:1) Binding loop detected for property \"rectProperty.width\"");
+ QString message = component.url().toString() + ":2:1: QML MyTypeObject: Binding loop detected for property \"rectProperty.width\"";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
@@ -1133,8 +1162,6 @@ void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type,
}
}
-QML_DECLARE_TYPE(TestType)
-QML_DECLARE_TYPE(TestType2)
// Import tests (QT-558)
diff --git a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
index 5c2178f..0538738 100644
--- a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
+++ b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
@@ -1,5 +1,5 @@
-import Qt 4.6
-import Qt.widgets 4.6
+import Qt 4.7
+import Qt.widgets 4.7
Item {
id: resizable
diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml
new file mode 100644
index 0000000..296cb9c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml
@@ -0,0 +1,24 @@
+import Qt 4.7
+
+Item {
+ property string result
+
+ ListModel {
+ id: model
+
+ ListElement {
+ val1: 1
+ val2: 2
+ val3: "str"
+ val4: false
+ val5: true
+ }
+ }
+
+ Component.onCompleted: {
+ var element = model.get(0);
+
+ for (var i in element)
+ result += i+"="+element[i]+(element[i] ? "Y" : "N")+":";
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
index 4019948..f8a9175 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
+++ b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: item
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 9d61ad0..e4c296f 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -51,11 +51,11 @@
#include "../../../shared/util.h"
-class tst_QDeclarativeListModel : public QObject
+class tst_qdeclarativelistmodel : public QObject
{
Q_OBJECT
public:
- tst_QDeclarativeListModel() {}
+ tst_qdeclarativelistmodel() {}
private:
QScriptValue nestedListValue(QScriptEngine *eng) const;
@@ -76,12 +76,13 @@ private slots:
void convertNestedToFlat_fail_data();
void convertNestedToFlat_ok();
void convertNestedToFlat_ok_data();
+ void enumerate();
void error_data();
void error();
void set();
};
-QScriptValue tst_QDeclarativeListModel::nestedListValue(QScriptEngine *eng) const
+QScriptValue tst_qdeclarativelistmodel::nestedListValue(QScriptEngine *eng) const
{
QScriptValue list = eng->newArray();
list.setProperty(0, eng->newObject());
@@ -91,7 +92,7 @@ QScriptValue tst_QDeclarativeListModel::nestedListValue(QScriptEngine *eng) cons
return sv;
}
-QDeclarativeItem *tst_QDeclarativeListModel::createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model)
+QDeclarativeItem *tst_qdeclarativelistmodel::createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model)
{
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component->create());
QDeclarativeEngine::setContextForObject(model, eng->rootContext());
@@ -100,7 +101,7 @@ QDeclarativeItem *tst_QDeclarativeListModel::createWorkerTest(QDeclarativeEngine
return item;
}
-void tst_QDeclarativeListModel::waitForWorker(QDeclarativeItem *item)
+void tst_qdeclarativelistmodel::waitForWorker(QDeclarativeItem *item)
{
QEventLoop loop;
QTimer timer;
@@ -115,7 +116,7 @@ void tst_QDeclarativeListModel::waitForWorker(QDeclarativeItem *item)
QVERIFY(timer.isActive());
}
-void tst_QDeclarativeListModel::static_i18n()
+void tst_qdeclarativelistmodel::static_i18n()
{
QString expect = QString::fromUtf8("na\303\257ve");
QString componentStr = "import Qt 4.7\nListModel { ListElement { prop1: \""+expect+"\" } }";
@@ -129,7 +130,7 @@ void tst_QDeclarativeListModel::static_i18n()
delete obj;
}
-void tst_QDeclarativeListModel::static_nestedElements()
+void tst_qdeclarativelistmodel::static_nestedElements()
{
QFETCH(int, elementCount);
@@ -163,7 +164,7 @@ void tst_QDeclarativeListModel::static_nestedElements()
delete obj;
}
-void tst_QDeclarativeListModel::static_nestedElements_data()
+void tst_qdeclarativelistmodel::static_nestedElements_data()
{
QTest::addColumn<int>("elementCount");
@@ -173,7 +174,7 @@ void tst_QDeclarativeListModel::static_nestedElements_data()
QTest::newRow("many items") << 5;
}
-void tst_QDeclarativeListModel::dynamic_data()
+void tst_qdeclarativelistmodel::dynamic_data()
{
QTest::addColumn<QString>("script");
QTest::addColumn<int>("result");
@@ -183,58 +184,58 @@ void tst_QDeclarativeListModel::dynamic_data()
QTest::newRow("count") << "count" << 0 << "";
- QTest::newRow("get1") << "{get(0)}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
- QTest::newRow("get2") << "{get(-1)}" << 0 << "QML ListModel (unknown location) get: index -1 out of range";
+ QTest::newRow("get1") << "{get(0)}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
+ QTest::newRow("get2") << "{get(-1)}" << 0 << "<Unknown File>: QML ListModel: get: index -1 out of range";
QTest::newRow("append1") << "{append({'foo':123});count}" << 1 << "";
QTest::newRow("append2") << "{append({'foo':123,'bar':456});count}" << 1 << "";
QTest::newRow("append3a") << "{append({'foo':123});append({'foo':456});get(0).foo}" << 123 << "";
QTest::newRow("append3b") << "{append({'foo':123});append({'foo':456});get(1).foo}" << 456 << "";
- QTest::newRow("append4a") << "{append(123)}" << 0 << "QML ListModel (unknown location) append: value is not an object";
- QTest::newRow("append4b") << "{append([1,2,3])}" << 0 << "QML ListModel (unknown location) append: value is not an object";
+ QTest::newRow("append4a") << "{append(123)}" << 0 << "<Unknown File>: QML ListModel: append: value is not an object";
+ QTest::newRow("append4b") << "{append([1,2,3])}" << 0 << "<Unknown File>: QML ListModel: append: value is not an object";
QTest::newRow("clear1") << "{append({'foo':456});clear();count}" << 0 << "";
QTest::newRow("clear2") << "{append({'foo':123});append({'foo':456});clear();count}" << 0 << "";
- QTest::newRow("clear3") << "{append({'foo':123});clear();get(0).foo}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
+ QTest::newRow("clear3") << "{append({'foo':123});clear();get(0).foo}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
QTest::newRow("remove1") << "{append({'foo':123});remove(0);count}" << 0 << "";
QTest::newRow("remove2a") << "{append({'foo':123});append({'foo':456});remove(0);count}" << 1 << "";
QTest::newRow("remove2b") << "{append({'foo':123});append({'foo':456});remove(0);get(0).foo}" << 456 << "";
QTest::newRow("remove2c") << "{append({'foo':123});append({'foo':456});remove(1);get(0).foo}" << 123 << "";
- QTest::newRow("remove3") << "{append({'foo':123});remove(0);get(0).foo}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
- QTest::newRow("remove3a") << "{append({'foo':123});remove(-1);count}" << 1 << "QML ListModel (unknown location) remove: index -1 out of range";
- QTest::newRow("remove4a") << "{remove(0)}" << 0 << "QML ListModel (unknown location) remove: index 0 out of range";
- QTest::newRow("remove4b") << "{append({'foo':123});remove(0);remove(0);count}" << 0 << "QML ListModel (unknown location) remove: index 0 out of range";
- QTest::newRow("remove4c") << "{append({'foo':123});remove(1);count}" << 1 << "QML ListModel (unknown location) remove: index 1 out of range";
+ QTest::newRow("remove3") << "{append({'foo':123});remove(0);get(0).foo}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
+ QTest::newRow("remove3a") << "{append({'foo':123});remove(-1);count}" << 1 << "<Unknown File>: QML ListModel: remove: index -1 out of range";
+ QTest::newRow("remove4a") << "{remove(0)}" << 0 << "<Unknown File>: QML ListModel: remove: index 0 out of range";
+ QTest::newRow("remove4b") << "{append({'foo':123});remove(0);remove(0);count}" << 0 << "<Unknown File>: QML ListModel: remove: index 0 out of range";
+ QTest::newRow("remove4c") << "{append({'foo':123});remove(1);count}" << 1 << "<Unknown File>: QML ListModel: remove: index 1 out of range";
QTest::newRow("insert1") << "{insert(0,{'foo':123});count}" << 1 << "";
- QTest::newRow("insert2") << "{insert(1,{'foo':123});count}" << 0 << "QML ListModel (unknown location) insert: index 1 out of range";
+ QTest::newRow("insert2") << "{insert(1,{'foo':123});count}" << 0 << "<Unknown File>: QML ListModel: insert: index 1 out of range";
QTest::newRow("insert3a") << "{append({'foo':123});insert(1,{'foo':456});count}" << 2 << "";
QTest::newRow("insert3b") << "{append({'foo':123});insert(1,{'foo':456});get(0).foo}" << 123 << "";
QTest::newRow("insert3c") << "{append({'foo':123});insert(1,{'foo':456});get(1).foo}" << 456 << "";
QTest::newRow("insert3d") << "{append({'foo':123});insert(0,{'foo':456});get(0).foo}" << 456 << "";
QTest::newRow("insert3e") << "{append({'foo':123});insert(0,{'foo':456});get(1).foo}" << 123 << "";
- QTest::newRow("insert4") << "{append({'foo':123});insert(-1,{'foo':456});count}" << 1 << "QML ListModel (unknown location) insert: index -1 out of range";
- QTest::newRow("insert5a") << "{insert(0,123)}" << 0 << "QML ListModel (unknown location) insert: value is not an object";
- QTest::newRow("insert5b") << "{insert(0,[1,2,3])}" << 0 << "QML ListModel (unknown location) insert: value is not an object";
+ QTest::newRow("insert4") << "{append({'foo':123});insert(-1,{'foo':456});count}" << 1 << "<Unknown File>: QML ListModel: insert: index -1 out of range";
+ QTest::newRow("insert5a") << "{insert(0,123)}" << 0 << "<Unknown File>: QML ListModel: insert: value is not an object";
+ QTest::newRow("insert5b") << "{insert(0,[1,2,3])}" << 0 << "<Unknown File>: QML ListModel: insert: value is not an object";
QTest::newRow("set1") << "{append({'foo':123});set(0,{'foo':456});count}" << 1 << "";
QTest::newRow("set2") << "{append({'foo':123});set(0,{'foo':456});get(0).foo}" << 456 << "";
QTest::newRow("set3a") << "{append({'foo':123,'bar':456});set(0,{'foo':999});get(0).foo}" << 999 << "";
QTest::newRow("set3b") << "{append({'foo':123,'bar':456});set(0,{'foo':999});get(0).bar}" << 456 << "";
- QTest::newRow("set4a") << "{set(0,{'foo':456})}" << 0 << "QML ListModel (unknown location) set: index 0 out of range";
- QTest::newRow("set4c") << "{set(-1,{'foo':456})}" << 0 << "QML ListModel (unknown location) set: index -1 out of range";
- QTest::newRow("set5a") << "{append({'foo':123,'bar':456});set(0,123);count}" << 1 << "QML ListModel (unknown location) set: value is not an object";
- QTest::newRow("set5b") << "{append({'foo':123,'bar':456});set(0,[1,2,3]);count}" << 1 << "QML ListModel (unknown location) set: value is not an object";
+ QTest::newRow("set4a") << "{set(0,{'foo':456})}" << 0 << "<Unknown File>: QML ListModel: set: index 0 out of range";
+ QTest::newRow("set4c") << "{set(-1,{'foo':456})}" << 0 << "<Unknown File>: QML ListModel: set: index -1 out of range";
+ QTest::newRow("set5a") << "{append({'foo':123,'bar':456});set(0,123);count}" << 1 << "<Unknown File>: QML ListModel: set: value is not an object";
+ QTest::newRow("set5b") << "{append({'foo':123,'bar':456});set(0,[1,2,3]);count}" << 1 << "<Unknown File>: QML ListModel: set: value is not an object";
QTest::newRow("set6") << "{append({'foo':123});set(1,{'foo':456});count}" << 2 << "";
QTest::newRow("setprop1") << "{append({'foo':123});setProperty(0,'foo',456);count}" << 1 << "";
QTest::newRow("setprop2") << "{append({'foo':123});setProperty(0,'foo',456);get(0).foo}" << 456 << "";
QTest::newRow("setprop3a") << "{append({'foo':123,'bar':456});setProperty(0,'foo',999);get(0).foo}" << 999 << "";
QTest::newRow("setprop3b") << "{append({'foo':123,'bar':456});setProperty(0,'foo',999);get(0).bar}" << 456 << "";
- QTest::newRow("setprop4a") << "{setProperty(0,'foo',456)}" << 0 << "QML ListModel (unknown location) set: index 0 out of range";
- QTest::newRow("setprop4b") << "{setProperty(-1,'foo',456)}" << 0 << "QML ListModel (unknown location) set: index -1 out of range";
- QTest::newRow("setprop4c") << "{append({'foo':123,'bar':456});setProperty(1,'foo',456);count}" << 1 << "QML ListModel (unknown location) set: index 1 out of range";
+ QTest::newRow("setprop4a") << "{setProperty(0,'foo',456)}" << 0 << "<Unknown File>: QML ListModel: set: index 0 out of range";
+ QTest::newRow("setprop4b") << "{setProperty(-1,'foo',456)}" << 0 << "<Unknown File>: QML ListModel: set: index -1 out of range";
+ QTest::newRow("setprop4c") << "{append({'foo':123,'bar':456});setProperty(1,'foo',456);count}" << 1 << "<Unknown File>: QML ListModel: set: index 1 out of range";
QTest::newRow("setprop5") << "{append({'foo':123,'bar':456});append({'foo':111});setProperty(1,'bar',222);get(1).bar}" << 222 << "";
QTest::newRow("move1a") << "{append({'foo':123});append({'foo':456});move(0,1,1);count}" << 2 << "";
@@ -246,10 +247,10 @@ void tst_QDeclarativeListModel::dynamic_data()
QTest::newRow("move2b") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(0).foo}" << 789 << "";
QTest::newRow("move2c") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(1).foo}" << 123 << "";
QTest::newRow("move2d") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(2).foo}" << 456 << "";
- QTest::newRow("move3a") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,3);count}" << 3 << "QML ListModel (unknown location) move: out of range";
- QTest::newRow("move3b") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,-1,1);count}" << 3 << "QML ListModel (unknown location) move: out of range";
- QTest::newRow("move3c") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,-1);count}" << 3 << "QML ListModel (unknown location) move: out of range";
- QTest::newRow("move3d") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,3,1);count}" << 3 << "QML ListModel (unknown location) move: out of range";
+ QTest::newRow("move3a") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,3);count}" << 3 << "<Unknown File>: QML ListModel: move: out of range";
+ QTest::newRow("move3b") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,-1,1);count}" << 3 << "<Unknown File>: QML ListModel: move: out of range";
+ QTest::newRow("move3c") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,-1);count}" << 3 << "<Unknown File>: QML ListModel: move: out of range";
+ QTest::newRow("move3d") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,3,1);count}" << 3 << "<Unknown File>: QML ListModel: move: out of range";
// Nested models
@@ -264,7 +265,7 @@ void tst_QDeclarativeListModel::dynamic_data()
//QTest::newRow("nested-setprop") << "{append({'foo':123});setProperty(0,'foo',[{'x':123}]);get(0).foo.get(0).x}" << 123 << "";
}
-void tst_QDeclarativeListModel::dynamic()
+void tst_qdeclarativelistmodel::dynamic()
{
QFETCH(QString, script);
QFETCH(int, result);
@@ -285,12 +286,12 @@ void tst_QDeclarativeListModel::dynamic()
QCOMPARE(actual,result);
}
-void tst_QDeclarativeListModel::dynamic_worker_data()
+void tst_qdeclarativelistmodel::dynamic_worker_data()
{
dynamic_data();
}
-void tst_QDeclarativeListModel::dynamic_worker()
+void tst_qdeclarativelistmodel::dynamic_worker()
{
QFETCH(QString, script);
QFETCH(int, result);
@@ -323,7 +324,13 @@ void tst_QDeclarativeListModel::dynamic_worker()
// execute a set of commands on the worker list model, then check the
// changes are reflected in the list model in the main thread
if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
- QTest::ignoreMessage(QtWarningMsg, "QML ListModel (unknown location) Cannot add nested list values when modifying or after modification from a worker script");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: Cannot add nested list values when modifying or after modification from a worker script");
+
+ if (QByteArray(QTest::currentDataTag()).startsWith("nested-append")) {
+ int callsToGet = script.count(QLatin1String(";get("));
+ for (int i=0; i<callsToGet; i++)
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: get: index 0 out of range");
+ }
QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker",
Q_ARG(QVariant, operations.mid(0, operations.length()-1))));
@@ -340,7 +347,7 @@ void tst_QDeclarativeListModel::dynamic_worker()
qApp->processEvents();
}
-void tst_QDeclarativeListModel::convertNestedToFlat_fail()
+void tst_qdeclarativelistmodel::convertNestedToFlat_fail()
{
// If a model has nested data, it cannot be used at all from a worker script
@@ -359,7 +366,7 @@ void tst_QDeclarativeListModel::convertNestedToFlat_fail()
model.append(nestedListValue(&s_eng));
QCOMPARE(model.count(), 2);
- QTest::ignoreMessage(QtWarningMsg, "QML ListModel (unknown location) List contains nested list values and cannot be used from a worker script");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: List contains nested list values and cannot be used from a worker script");
QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, script)));
waitForWorker(item);
@@ -369,7 +376,7 @@ void tst_QDeclarativeListModel::convertNestedToFlat_fail()
qApp->processEvents();
}
-void tst_QDeclarativeListModel::convertNestedToFlat_fail_data()
+void tst_qdeclarativelistmodel::convertNestedToFlat_fail_data()
{
QTest::addColumn<QString>("script");
@@ -383,7 +390,7 @@ void tst_QDeclarativeListModel::convertNestedToFlat_fail_data()
QTest::newRow("get") << "get(0)";
}
-void tst_QDeclarativeListModel::convertNestedToFlat_ok()
+void tst_qdeclarativelistmodel::convertNestedToFlat_ok()
{
// If a model only has plain data, it can be modified from a worker script. However,
// once the model is used from a worker script, it no longer accepts nested data
@@ -411,7 +418,7 @@ void tst_QDeclarativeListModel::convertNestedToFlat_ok()
QCOMPARE(model.count(), count+1);
QScriptValue nested = nestedListValue(&s_eng);
- const char *warning = "QML ListModel (unknown location) Cannot add nested list values when modifying or after modification from a worker script";
+ const char *warning = "<Unknown File>: QML ListModel: Cannot add nested list values when modifying or after modification from a worker script";
QTest::ignoreMessage(QtWarningMsg, warning);
model.append(nested);
@@ -428,12 +435,12 @@ void tst_QDeclarativeListModel::convertNestedToFlat_ok()
qApp->processEvents();
}
-void tst_QDeclarativeListModel::convertNestedToFlat_ok_data()
+void tst_qdeclarativelistmodel::convertNestedToFlat_ok_data()
{
convertNestedToFlat_fail_data();
}
-void tst_QDeclarativeListModel::static_types_data()
+void tst_qdeclarativelistmodel::static_types_data()
{
QTest::addColumn<QString>("qml");
QTest::addColumn<QVariant>("value");
@@ -463,7 +470,7 @@ void tst_QDeclarativeListModel::static_types_data()
<< QVariant(double(QDeclarativeText::AlignHCenter));
}
-void tst_QDeclarativeListModel::static_types()
+void tst_qdeclarativelistmodel::static_types()
{
QFETCH(QString, qml);
QFETCH(QVariant, value);
@@ -494,7 +501,24 @@ void tst_QDeclarativeListModel::static_types()
delete obj;
}
-void tst_QDeclarativeListModel::error_data()
+void tst_qdeclarativelistmodel::enumerate()
+{
+ QDeclarativeEngine eng;
+ QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/enumerate.qml"));
+ QVERIFY(!component.isError());
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QStringList r = item->property("result").toString().split(":");
+ QCOMPARE(r[0],QLatin1String("val1=1Y"));
+ QCOMPARE(r[1],QLatin1String("val2=2Y"));
+ QCOMPARE(r[2],QLatin1String("val3=strY"));
+ QCOMPARE(r[3],QLatin1String("val4=falseN"));
+ QCOMPARE(r[4],QLatin1String("val5=trueY"));
+ delete item;
+}
+
+
+void tst_qdeclarativelistmodel::error_data()
{
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("error");
@@ -532,7 +556,7 @@ void tst_QDeclarativeListModel::error_data()
<< "ListElement: cannot contain nested elements";
}
-void tst_QDeclarativeListModel::error()
+void tst_qdeclarativelistmodel::error()
{
QFETCH(QString, qml);
QFETCH(QString, error);
@@ -551,7 +575,7 @@ void tst_QDeclarativeListModel::error()
}
}
-void tst_QDeclarativeListModel::set()
+void tst_qdeclarativelistmodel::set()
{
QDeclarativeEngine engine;
QDeclarativeListModel model;
@@ -575,6 +599,6 @@ void tst_QDeclarativeListModel::set()
}
-QTEST_MAIN(tst_QDeclarativeListModel)
+QTEST_MAIN(tst_qdeclarativelistmodel)
#include "tst_qdeclarativelistmodel.moc"
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml
index d08f35b..0275e21 100644
--- a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml
+++ b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml
index 670aee4..1ab5692 100644
--- a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml
+++ b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property list<MyType> myList
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
index d64be0f..13de975 100644
--- a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
+++ b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property list<QtObject> myList;
diff --git a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
index 908f336..7689270 100644
--- a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
+++ b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
@@ -102,7 +102,6 @@ public:
QList<TestType *> data;
QDeclarativeListProperty<TestType> property;
};
-QML_DECLARE_TYPE(TestType);
void tst_qdeclarativelistreference::initTestCase()
{
diff --git a/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml
index 7b124a5..defd13e 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
index e6b5c8f..66728d6 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
@@ -1,7 +1,7 @@
// This example demonstrates placing items in a view using
// a VisualItemModel
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightgray"
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml
index 46fddae..939a4d5 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml
index a6d7610..0599ddd 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property int current: list.currentIndex
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml
index 4b5bea6..a6f3ab8 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml
index 40fc436..3b2db5e 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
index 09877ac..300fcb5 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 180; height: 120; color: "white"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml
index 3b49f6a..f202fc8 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
objectName: "blue"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
index 4ebf366..9bb0b37 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.widgets 4.6
QGraphicsWidget {
diff --git a/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml
index 7ee3513..9b8f770 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
index cfbb55a..6aa3d2f 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: "NoResize"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
index 5eab965..9322141 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: Loader.NoResize
diff --git a/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml
index aa4b0c2..d808c51 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 120
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
index 1db56c4..d99dd01 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
@@ -1,6 +1,9 @@
-import Qt 4.6
+import Qt 4.7
Item {
+ function clear() {
+ loader.sourceComponent = undefined
+ }
Component { id: comp; Rectangle { width: 100; height: 50 } }
- Loader { sourceComponent: comp }
+ Loader { id: loader; sourceComponent: comp }
}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
index 568a136..0cfb4df 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: Loader.SizeItemToLoader
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
index a710803..b588c9d 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: Loader.SizeLoaderToItem
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
index b52fa03..93be6f1 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: "SizeLoaderToItem"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
index 1a107e1..04b46fb 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
resizeMode: "SizeItemToLoader"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml
index da4f6cb..633f03d 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 100; height: 100; color: "red"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/crash.qml b/tests/auto/declarative/qdeclarativeloader/data/crash.qml
index 8474e78..db9abca 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/crash.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/crash.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400
diff --git a/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml
index e682d1c..b32558b 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Loader { source: "http://evil.place/evil.qml" }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml
index f42c1d5..5ce003d 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
sourceComponent: QtObject {}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml
index e281246..812c1be 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Item { }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml
index e7f5a14..91732a1 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Loader { source: "sameorigin-load.qml" }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml
index 782562b..ae33e00 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Loader {
source: "VmeError.qml"
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 4a82b50..7cdadb4 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -138,7 +138,7 @@ void tst_QDeclarativeLoader::component()
void tst_QDeclarativeLoader::invalidUrl()
{
- QTest::ignoreMessage(QtWarningMsg, QString("(:-1: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ") ").toUtf8().constData());
+ QTest::ignoreMessage(QtWarningMsg, QString("<Unknown File>: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString()).toUtf8().constData());
QDeclarativeComponent component(&engine);
component.setData(QByteArray("import Qt 4.7\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
@@ -198,6 +198,26 @@ void tst_QDeclarativeLoader::clear()
delete item;
}
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
+ QVERIFY(loader);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ QMetaObject::invokeMethod(item, "clear");
+
+ QVERIFY(loader->item() == 0);
+ QCOMPARE(loader->progress(), 0.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Null);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
+
+ delete item;
+ }
}
void tst_QDeclarativeLoader::urlToComponent()
@@ -465,7 +485,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QVERIFY(server.isValid());
server.serveDirectory(SRCDIR "/data");
- QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14450/IDontExist.qml) ");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Network error for URL http://127.0.0.1:14450/IDontExist.qml");
QDeclarativeComponent component(&engine);
component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/IDontExist.qml\" }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
@@ -505,7 +525,7 @@ void tst_QDeclarativeLoader::deleteComponentCrash()
void tst_QDeclarativeLoader::nonItem()
{
QDeclarativeComponent component(&engine, TEST_FILE("nonItem.qml"));
- QString err = QString("QML Loader (") + QUrl::fromLocalFile(SRCDIR).toString() + QString("/data/nonItem.qml:3:1) Loader does not support loading non-visual elements.");
+ QString err = QUrl::fromLocalFile(SRCDIR).toString() + "/data/nonItem.qml:3:1: QML Loader: Loader does not support loading non-visual elements.";
QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
@@ -518,9 +538,8 @@ void tst_QDeclarativeLoader::nonItem()
void tst_QDeclarativeLoader::vmeErrors()
{
QDeclarativeComponent component(&engine, TEST_FILE("vmeErrors.qml"));
- //ignore message for now
- //QString err = QUrl::fromLocalFile(SRCDIR "/data/VmeError.qml:6: Cannot assign object type QObject with no default method\n onSomethingHappened: QtObject {}) ");
- //QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
+ QString err = QUrl::fromLocalFile(SRCDIR).toString() + "/data/VmeError.qml:6: Cannot assign object type QObject with no default method";
+ QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader);
QVERIFY(loader->item() == 0);
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
index fd94cc6..7d89bee 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
@@ -61,8 +61,6 @@ private:
int v;
};
-QML_DECLARE_TYPE(MyPluginType);
-
class MyPlugin : public QDeclarativeExtensionPlugin
{
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml
index e800f98..f926daa 100644
--- a/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml
+++ b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml
new file mode 100644
index 0000000..a28f049
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml
@@ -0,0 +1,28 @@
+import Qt 4.7
+Rectangle {
+ id: whiteRect
+ width: 200
+ height: 200
+ color: "white"
+ Rectangle {
+ id: blackRect
+ objectName: "blackrect"
+ color: "black"
+ y: 50
+ x: 50
+ width: 100
+ height: 100
+ opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200
+ Text { text: blackRect.opacity}
+ MouseArea {
+ objectName: "mouseregion"
+ anchors.fill: parent
+ drag.target: blackRect
+ drag.axis: Drag.XandYAxis
+ drag.minimumX: 0
+ drag.maximumX: whiteRect.width-blackRect.width
+ drag.minimumY: 0
+ drag.maximumY: whiteRect.height-blackRect.height
+ }
+ }
+ }
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml
index 4cd78da..ba15250 100644
--- a/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml
+++ b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: whiteRect
width: 200
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml
index 4bfb9c3..789125b 100644
--- a/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml
+++ b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: whiteRect
width: 200
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
index 0da7c45..6008499 100644
--- a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
+++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "#ffffff"
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml
new file mode 100644
index 0000000..2a2b905
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml
@@ -0,0 +1,38 @@
+import Qt 4.7
+
+Rectangle {
+ color: "#ffffff"
+ width: 320; height: 240
+ Rectangle {
+ id: brother
+ objectName: "brother"
+ color: "lightgreen"
+ x: 200; y: 100
+ width: 120; height: 120
+ }
+ MouseArea {
+ id: mouseRegion
+ objectName: "mouseregion"
+
+ property int x1
+ property int y1
+ property int x2
+ property int y2
+ property bool emitPositionChanged: false
+ property bool mouseMatchesPos: true
+
+ anchors.fill: brother
+ onPressed: {
+ if (mouse.x != mouseX || mouse.y != mouseY)
+ mouseMatchesPos = false
+ x1 = mouseX; y1 = mouseY
+ anchors.fill = parent
+ }
+ onPositionChanged: { emitPositionChanged = true }
+ onMousePositionChanged: {
+ if (mouse.x != mouseX || mouse.y != mouseY)
+ mouseMatchesPos = false
+ x2 = mouseX; y2 = mouseY
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index bdb8eca..eb4aa12 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -52,7 +52,9 @@ class tst_QDeclarativeMouseArea: public QObject
private slots:
void dragProperties();
void resetDrag();
+ void dragging();
void updateMouseAreaPosOnClick();
+ void updateMouseAreaPosOnResize();
void noOnClickedWithPressAndHold();
private:
QDeclarativeView *createView();
@@ -162,6 +164,61 @@ void tst_QDeclarativeMouseArea::resetDrag()
}
+void tst_QDeclarativeMouseArea::dragging()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragging.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QDeclarativeDrag *drag = mouseRegion->drag();
+ QVERIFY(mouseRegion != 0);
+ QVERIFY(drag != 0);
+
+ // target
+ QDeclarativeItem *blackRect = canvas->rootObject()->findChild<QDeclarativeItem*>("blackrect");
+ QVERIFY(blackRect != 0);
+ QVERIFY(blackRect == drag->target());
+
+ QVERIFY(!drag->active());
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent pressEvent(QEvent::GraphicsSceneMousePress);
+ pressEvent.setScenePos(QPointF(100, 100));
+ pressEvent.setButton(Qt::LeftButton);
+ pressEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &pressEvent);
+
+ QVERIFY(!drag->active());
+ QCOMPARE(blackRect->x(), 50.0);
+ QCOMPARE(blackRect->y(), 50.0);
+
+ QGraphicsSceneMouseEvent moveEvent(QEvent::GraphicsSceneMouseMove);
+ moveEvent.setScenePos(QPointF(110, 110));
+ moveEvent.setButton(Qt::LeftButton);
+ moveEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &moveEvent);
+
+ QVERIFY(drag->active());
+ QCOMPARE(blackRect->x(), 60.0);
+ QCOMPARE(blackRect->y(), 60.0);
+
+ QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMouseRelease);
+ releaseEvent.setScenePos(QPointF(110, 110));
+ releaseEvent.setButton(Qt::LeftButton);
+ releaseEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &releaseEvent);
+
+ QVERIFY(!drag->active());
+ QCOMPARE(blackRect->x(), 60.0);
+ QCOMPARE(blackRect->y(), 60.0);
+
+ delete canvas;
+}
+
QDeclarativeView *tst_QDeclarativeMouseArea::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
@@ -203,6 +260,46 @@ void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
delete canvas;
}
+void tst_QDeclarativeMouseArea::updateMouseAreaPosOnResize()
+{
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/updateMousePosOnResize.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QVERIFY(mouseRegion != 0);
+
+ QDeclarativeRectangle *rect = canvas->rootObject()->findChild<QDeclarativeRectangle*>("brother");
+ QVERIFY(rect != 0);
+
+ QCOMPARE(mouseRegion->mouseX(), 0.0);
+ QCOMPARE(mouseRegion->mouseY(), 0.0);
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+ event.setScenePos(rect->pos());
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &event);
+
+ QVERIFY(!mouseRegion->property("emitPositionChanged").toBool());
+ QVERIFY(mouseRegion->property("mouseMatchesPos").toBool());
+
+ QCOMPARE(mouseRegion->property("x1").toInt(), 0);
+ QCOMPARE(mouseRegion->property("y1").toInt(), 0);
+
+ // XXX: is it on purpose that mouseX is real and mouse.x is int?
+ QCOMPARE(mouseRegion->property("x2").toInt(), (int) rect->x());
+ QCOMPARE(mouseRegion->property("y2").toInt(), (int) rect->y());
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ delete canvas;
+}
+
void tst_QDeclarativeMouseArea::noOnClickedWithPressAndHold()
{
QDeclarativeView *canvas = createView();
diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml b/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml
index f1e4909..ec8f452 100644
--- a/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml
+++ b/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Rectangle {
diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml b/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml
index 4f168a9..af15665 100644
--- a/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml
+++ b/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Rectangle{
diff --git a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
index 8d07db2..a5c3772 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
PathView {
id: pathview
diff --git a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml
index eded122..c82914f 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml
index 7e82a48..caa1586 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Path {
startX: 120; startY: 100
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
index 1866875..a3afd38 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml
index b3b0a9a..c3d2f91 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
PathView {
}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml
index c825292..2ce66a2 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
PathView {
id: photoPathView
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml
index b143294..066c531 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
PathView {
id: photoPathView
diff --git a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml
index 1ae1ad2..6cc9d2a 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 350; height: 220; color: "white"
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml
index 6c1c823..3ba015d 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 90
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml
index 9741ba9..3a56be6 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml
index e335932..e098812 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml
index 34a84bf..8799366 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml
index 1d6f44e..ab7238a 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml
index 052d96b..8e11f4e 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml
index a1c05a8..20a6258 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml
index fb9fdd1..0e368c1 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml
index 3a7a3b1..71ad6ec 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml
index 4370a18..a53ff82 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Grid {
id: myGrid
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml
index 2bc5e94..531d716 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml
index 31faa54..1499c1e 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml
index 1c5696b..f7e853a 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml
index cd777e2..9e3d6ab 100644
--- a/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 640
diff --git a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml
index 1dfb3e1..2177ae2 100644
--- a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml
+++ b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a: 10
diff --git a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml
index 8085db2..0918e86 100644
--- a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml
+++ b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property TestType test
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
index 7d51bb6..53614fe 100644
--- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -310,7 +310,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QCOMPARE(prop.propertyTypeName(), "int");
QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Unable to assign null to int");
QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0);
QVERIFY(binding != 0);
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data());
@@ -409,7 +409,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.propertyTypeName(), "int");
QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Unable to assign null to int");
QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0);
QVERIFY(binding != 0);
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data());
@@ -602,7 +602,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QCOMPARE(prop.propertyTypeName(), "int");
QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Unable to assign null to int");
QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0);
QVERIFY(binding != 0);
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data());
@@ -701,7 +701,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.propertyTypeName(), "int");
QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Unable to assign null to int");
QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding.data()) == 0);
QVERIFY(binding != 0);
QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding.data());
diff --git a/tests/auto/declarative/qdeclarativeqt/data/atob.qml b/tests/auto/declarative/qdeclarativeqt/data/atob.qml
new file mode 100644
index 0000000..8355fa5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/atob.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+QtObject {
+ property string test1: Qt.atob()
+ property string test2: Qt.atob("SGVsbG8gd29ybGQh")
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/btoa.qml b/tests/auto/declarative/qdeclarativeqt/data/btoa.qml
new file mode 100644
index 0000000..c2993ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/btoa.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ property string test1: Qt.btoa()
+ property string test2: Qt.btoa("Hello world!")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml
index e657ff1..aa9e92a 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
index d9b70ec..f966931 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
@@ -1,23 +1,20 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
- property bool incorrectArgCount1: false
- property bool incorrectArgCount2: false
property bool emptyArg: false
property string relativeUrl
property string absoluteUrl
- Component.onCompleted: {
- // Test that using incorrect argument count returns a null object
- incorrectArgCount1 = (createComponent() == null);
- incorrectArgCount2 = (createComponent("main.qml", 10) == null);
- emptyArg = (createComponent("") == null);
+ property QtObject incorectArgCount1: Qt.createComponent()
+ property QtObject incorectArgCount2: Qt.createComponent("main.qml", 10)
- var r = createComponent("createComponentData.qml");
+ Component.onCompleted: {
+ emptyArg = (Qt.createComponent("") == null);
+ var r = Qt.createComponent("createComponentData.qml");
relativeUrl = r.url;
- var a = createComponent("http://www.example.com/test.qml");
+ var a = Qt.createComponent("http://www.example.com/test.qml");
absoluteUrl = a.url;
}
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml
index a5e99a0..dc3e0d3 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int test: 1913
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
index 54a3e7d..ca3ff22 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
@@ -1,31 +1,31 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
- property bool incorrectArgCount1: false
- property bool incorrectArgCount2: false
+ // errors resulting in exceptions
+ property QtObject incorrectArgCount1: Qt.createQmlObject()
+ property QtObject incorrectArgCount2: Qt.createQmlObject("import Qt 4.7\nQtObject{}", root, "main.qml", 10)
+ property QtObject noParent: Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13}", 0)
+ property QtObject notAvailable: Qt.createQmlObject("import Qt 4.7\nQtObject{Blah{}}", root)
+ property QtObject errors: Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml")
+
property bool emptyArg: false
- property bool noParent: false
- property bool notAvailable: false
- property bool runtimeError: false
- property bool errors: false
property bool success: false
Component.onCompleted: {
- // errors
- incorrectArgCount1 = (createQmlObject() == null);
- incorrectArgCount2 = (createQmlObject("import Qt 4.6\nQtObject{}", root, "main.qml", 10) == null);
- emptyArg = (createQmlObject("", root) == null);
- errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null);
- noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null);
- notAvailable = (createQmlObject("import Qt 4.6\nQtObject{Blah{}}", root) == null);
- runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null);
+ // errors resulting in nulls
+ emptyArg = (Qt.createQmlObject("", root) == null);
+ try {
+ Qt.createQmlObject("import Qt 4.7\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root)
+ } catch (error) {
+ console.log("RunTimeError: ",error.message);
+ }
- var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root);
+ var o = Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13\n}", root);
success = (o.test == 13);
- createQmlObject("import Qt 4.6\nItem {}\n", root);
+ Qt.createQmlObject("import Qt 4.7\nItem {}\n", root);
}
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
index b265a0e..f6333fe 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/darker.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.darker(Qt.rgba(1, 0.8, 0.3))
diff --git a/tests/auto/declarative/qdeclarativeqt/data/enums.qml b/tests/auto/declarative/qdeclarativeqt/data/enums.qml
index 1efa6f5..a0190cc 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/enums.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/enums.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int test1: Qt.Key_Escape
diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
index 4cf0602..59a15929 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property date date1: "2008-12-24"
diff --git a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml
index df51ccd..4ca67a3 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml
@@ -1,11 +1,11 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property color test1: Qt.hsla(1, 0, 0, 0.8);
property color test2: Qt.hsla(1, 0.5, 0.3);
property color test3: Qt.hsla(1, 1);
property color test4: Qt.hsla(1, 1, 1, 1, 1);
- property color test5: Qt.hsla(1.2, 1, 1);
- property color test6: Qt.hsla(-0.1, 1, 1);
+ property color test5: Qt.hsla(1.2, 1.3, 1.4, 1.5);
+ property color test6: Qt.hsla(-0.1, -0.2, -0.3, -0.4);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml
index d986492..0f573c4 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
id: root
diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
index 2d2b835..6c0053ba 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3))
diff --git a/tests/auto/declarative/qdeclarativeqt/data/md5.qml b/tests/auto/declarative/qdeclarativeqt/data/md5.qml
index c474b71..07f719b 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/md5.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/md5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string test1: Qt.md5()
diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
index 70bd74d..3ceb05d 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
Component.onCompleted: Qt.openUrlExternally("test:url")
diff --git a/tests/auto/declarative/qdeclarativeqt/data/point.qml b/tests/auto/declarative/qdeclarativeqt/data/point.qml
index 1054ac9..0ada2d5 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/point.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/point.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.point(19, 34);
diff --git a/tests/auto/declarative/qdeclarativeqt/data/rect.qml b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
index e008656..fd38628 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/rect.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.rect(10, 13, 100, 109)
diff --git a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml
index 6dd6565..16606cd 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml
@@ -1,10 +1,10 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property color test1: Qt.rgba(1, 0, 0, 0.8);
property color test2: Qt.rgba(1, 0.5, 0.3);
property color test3: Qt.rgba(1, 1);
property color test4: Qt.rgba(1, 1, 1, 1, 1);
- property color test5: Qt.rgba(1.2, 1, 1);
- property color test6: Qt.rgba(-0.1, 1, 1);
+ property color test5: Qt.rgba(1.2, 1.3, 1.4, 1.5);
+ property color test6: Qt.rgba(-0.1, -0.2, -0.3, -0.4);
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/size.qml b/tests/auto/declarative/qdeclarativeqt/data/size.qml
index 93577f2..afcfb62 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/size.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/size.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.size(19, 34);
diff --git a/tests/auto/declarative/qdeclarativeqt/data/tint.qml b/tests/auto/declarative/qdeclarativeqt/data/tint.qml
index 478245f..25e7051 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/tint.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/tint.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property color test1: Qt.tint("red", "blue");
diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector.qml b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
index 16716db..b7708f5 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/vector.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property variant test1: Qt.vector3d(1, 0, 0.9);
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 98f1200..f5d5926 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -74,6 +74,8 @@ private slots:
void consoleLog();
void formatting();
void isQtObject();
+ void btoa();
+ void atob();
private:
QDeclarativeEngine engine;
@@ -102,14 +104,10 @@ void tst_qdeclarativeqt::rgba()
{
QDeclarativeComponent component(&engine, TEST_FILE("rgba.qml"));
- QString warning1 = component.url().toString() + ":6: Unable to assign null to QColor";
- QString warning2 = component.url().toString() + ":7: Unable to assign null to QColor";
- QString warning3 = component.url().toString() + ":8: Unable to assign null to QColor";
- QString warning4 = component.url().toString() + ":9: Unable to assign null to QColor";
+ QString warning1 = component.url().toString() + ":6: Error: Qt.rgba(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":7: Error: Qt.rgba(): Invalid arguments";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -119,8 +117,8 @@ void tst_qdeclarativeqt::rgba()
QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor::fromRgbF(1, 0.5, 0.3, 1));
QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor::fromRgbF(1, 1, 1, 1));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor::fromRgbF(0, 0, 0, 0));
delete object;
}
@@ -129,14 +127,10 @@ void tst_qdeclarativeqt::hsla()
{
QDeclarativeComponent component(&engine, TEST_FILE("hsla.qml"));
- QString warning1 = component.url().toString() + ":6: Unable to assign null to QColor";
- QString warning2 = component.url().toString() + ":7: Unable to assign null to QColor";
- QString warning3 = component.url().toString() + ":8: Unable to assign null to QColor";
- QString warning4 = component.url().toString() + ":9: Unable to assign null to QColor";
+ QString warning1 = component.url().toString() + ":6: Error: Qt.hsla(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":7: Error: Qt.hsla(): Invalid arguments";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -145,8 +139,8 @@ void tst_qdeclarativeqt::hsla()
QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor::fromHslF(1, 0.5, 0.3, 1));
QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor::fromHslF(1, 1, 1, 1));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor::fromHslF(0, 0, 0, 0));
delete object;
}
@@ -154,6 +148,12 @@ void tst_qdeclarativeqt::hsla()
void tst_qdeclarativeqt::rect()
{
QDeclarativeComponent component(&engine, TEST_FILE("rect.qml"));
+
+ QString warning1 = component.url().toString() + ":6: Error: Qt.rect(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":7: Error: Qt.rect(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -169,6 +169,12 @@ void tst_qdeclarativeqt::rect()
void tst_qdeclarativeqt::point()
{
QDeclarativeComponent component(&engine, TEST_FILE("point.qml"));
+
+ QString warning1 = component.url().toString() + ":6: Error: Qt.point(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":7: Error: Qt.point(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -183,6 +189,12 @@ void tst_qdeclarativeqt::point()
void tst_qdeclarativeqt::size()
{
QDeclarativeComponent component(&engine, TEST_FILE("size.qml"));
+
+ QString warning1 = component.url().toString() + ":7: Error: Qt.size(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":8: Error: Qt.size(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -198,6 +210,12 @@ void tst_qdeclarativeqt::size()
void tst_qdeclarativeqt::vector()
{
QDeclarativeComponent component(&engine, TEST_FILE("vector.qml"));
+
+ QString warning1 = component.url().toString() + ":6: Error: Qt.vector(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":7: Error: Qt.vector(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -212,6 +230,12 @@ void tst_qdeclarativeqt::vector()
void tst_qdeclarativeqt::lighter()
{
QDeclarativeComponent component(&engine, TEST_FILE("lighter.qml"));
+
+ QString warning1 = component.url().toString() + ":5: Error: Qt.lighter(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":6: Error: Qt.lighter(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -228,6 +252,12 @@ void tst_qdeclarativeqt::lighter()
void tst_qdeclarativeqt::darker()
{
QDeclarativeComponent component(&engine, TEST_FILE("darker.qml"));
+
+ QString warning1 = component.url().toString() + ":5: Error: Qt.darker(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":6: Error: Qt.darker(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
@@ -245,8 +275,9 @@ void tst_qdeclarativeqt::tint()
{
QDeclarativeComponent component(&engine, TEST_FILE("tint.qml"));
- QString warning1 = component.url().toString() + ":7: Unable to assign null to QColor";
- QString warning2 = component.url().toString() + ":8: Unable to assign null to QColor";
+ QString warning1 = component.url().toString() + ":7: Error: Qt.tint(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":8: Error: Qt.tint(): Invalid arguments";
+
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
@@ -293,10 +324,13 @@ void tst_qdeclarativeqt::openUrlExternally()
void tst_qdeclarativeqt::md5()
{
QDeclarativeComponent component(&engine, TEST_FILE("md5.qml"));
+
+ QString warning1 = component.url().toString() + ":4: Error: Qt.md5(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+
QObject *object = component.create();
QVERIFY(object != 0);
- QCOMPARE(object->property("test1").toString(), QLatin1String(QCryptographicHash::hash(QByteArray(), QCryptographicHash::Md5).toHex()));
QCOMPARE(object->property("test2").toString(), QLatin1String(QCryptographicHash::hash("Hello World", QCryptographicHash::Md5).toHex()));
delete object;
@@ -305,13 +339,15 @@ void tst_qdeclarativeqt::md5()
void tst_qdeclarativeqt::createComponent()
{
QDeclarativeComponent component(&engine, TEST_FILE("createComponent.qml"));
+
+ QString warning1 = component.url().toString() + ":9: Error: Qt.createComponent(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":10: Error: Qt.createComponent(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *object = component.create();
QVERIFY(object != 0);
- QCOMPARE(object->property("incorrectArgCount1").toBool(), true);
- QCOMPARE(object->property("incorrectArgCount2").toBool(), true);
- QCOMPARE(object->property("emptyArg").toBool(), true);
-
QCOMPARE(object->property("absoluteUrl").toString(), QString("http://www.example.com/test.qml"));
QCOMPARE(object->property("relativeUrl").toString(), TEST_FILE("createComponentData.qml").toString());
@@ -322,30 +358,24 @@ void tst_qdeclarativeqt::createQmlObject()
{
QDeclarativeComponent component(&engine, TEST_FILE("createQmlObject.qml"));
- QString warning1 = "QDeclarativeEngine::createQmlObject():";
- QString warning2 = " " + TEST_FILE("main.qml").toString() + ":4:1: Duplicate property name";
- QString warning3 = "QDeclarativeEngine::createQmlObject():";
- QString warning4 = " " + TEST_FILE("inline").toString() + ":2:10: Blah is not a type";
- QString warning5 = "QDeclarativeEngine::createQmlObject():";
- QString warning6 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
+ QString warning1 = component.url().toString() + ":7: Error: Qt.createQmlObject(): Invalid arguments";
+ QString warning2 = component.url().toString()+ ":10: Error: Qt.createQmlObject() failed to create object: " + TEST_FILE("inline").toString() + ":2:10: Blah is not a type\n";
+ QString warning3 = component.url().toString()+ ":11: Error: Qt.createQmlObject() failed to create object: " + TEST_FILE("main.qml").toString() + ":4:1: Duplicate property name\n";
+ QString warning4 = component.url().toString()+ ":9: Error: Qt.createQmlObject(): Missing parent object";
+ QString warning5 = component.url().toString()+ ":8: Error: Qt.createQmlObject(): Invalid arguments";
+ QString warning6 = "RunTimeError: Qt.createQmlObject() failed to create object: " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method\n";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning5));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(warning6));
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(warning6));
QObject *object = component.create();
QVERIFY(object != 0);
- QCOMPARE(object->property("incorrectArgCount1").toBool(), true);
- QCOMPARE(object->property("incorrectArgCount2").toBool(), true);
QCOMPARE(object->property("emptyArg").toBool(), true);
- QCOMPARE(object->property("errors").toBool(), true);
- QCOMPARE(object->property("noParent").toBool(), true);
- QCOMPARE(object->property("notAvailable").toBool(), true);
- QCOMPARE(object->property("runtimeError").toBool(), true);
QCOMPARE(object->property("success").toBool(), true);
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(object);
@@ -408,6 +438,36 @@ void tst_qdeclarativeqt::isQtObject()
delete object;
}
+void tst_qdeclarativeqt::btoa()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("btoa.qml"));
+
+ QString warning1 = component.url().toString() + ":4: Error: Qt.btoa(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test2").toString(), QString("SGVsbG8gd29ybGQh"));
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::atob()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("atob.qml"));
+
+ QString warning1 = component.url().toString() + ":4: Error: Qt.atob(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test2").toString(), QString("Hello world!"));
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeqt)
#include "tst_qdeclarativeqt.moc"
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml
index cf1fb4d..9cd03c4 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
index d74b2dc..e8dd8cc 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
@@ -1,7 +1,7 @@
// This example demonstrates placing items in a view using
// a VisualItemModel
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightgray"
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
index e6d0acb..17c5d8d 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
index 8c9f88e..34bbde0 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Row {
Repeater {
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml
index 7d83230..3047435 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
index c3c3260..c8b863c 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 240
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml
index cfece41..1de5f16 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
SmoothedAnimation {}
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml
index 74a110d..544e7e9 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SmoothedAnimation {
to: 10; duration: 300; reversingMode: SmoothedAnimation.Immediate
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml
index 3111e82..c1f3af0 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SmoothedAnimation {
to: 10; velocity: 250; reversingMode: SmoothedAnimation.Sync
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
index ec35067..3afeb7b 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 400; color: "blue"
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml
index 9ae744c..53429e2 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 300;
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml
index c162e7a..8c9d8ad 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow1.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
SmoothedFollow {}
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml
index d45001f..a634302 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SmoothedFollow {
to: 10; duration: 300; reversingMode: SmoothedFollow.Immediate
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml
index c09fb8e..c60da7f 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollow3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SmoothedFollow {
to: 10; velocity: 250; reversingMode: SmoothedFollow.Sync
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml
index 131f674..486bdee 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowDisabled.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 300;
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml
index 514537c..2e01d74 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/data/smoothedfollowValueSource.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 300;
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
index 959d206..8528cfa 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SpringFollow {
}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
index ffbf7d5..31a740a 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SpringFollow {
to: 1.44; velocity: 0.9
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
index 9a8f6f3..0fa4aa9 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
SpringFollow {
to: 1.44; velocity: 0.9
diff --git a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
index 8d64663..28e083c 100644
--- a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: extendedRect
objectName: "extendedRect"
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
index 5443e54..e9c9d67 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
index 56de560..cee2ce5 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
index 59c3c06..54dc34b 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
index 7e3ba1c..885c3ce 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
index b85a922..c3db72e 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
index 693a5c5..37e1e5a 100644
--- a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
index 6528113..d559691 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
index 2e7b4cf..a429b24 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
index a3c47d9..26405d9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
index 1f52d0e..153a2c1 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
index 88ea256..fca7916 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
index 4dd293f..72bd23e 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
index 62ab1d5..4fb1274 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
index a373cfc..b2f02c9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import Qt 4.6
+import Qt 4.7
MyRectangle {
id: rect
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
index 1836f8a..abfe71a 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/deleting.qml b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
index 3da0b12..a8a66cb 100644
--- a/tests/auto/declarative/qdeclarativestates/data/deleting.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
index a5e8ed3..fadb7d9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/explicit.qml b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
index 7543f84..718b169 100644
--- a/tests/auto/declarative/qdeclarativestates/data/explicit.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
property color sourceColor: "blue"
diff --git a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
index c7975e1..44397b5 100644
--- a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
index 480764e..26d0f50 100644
--- a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myItem
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
index 0dc39ae..13cab18 100644
--- a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: card
diff --git a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
index 9be984c..f757da0 100644
--- a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: card
diff --git a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
index a5dd86a..db9b017 100644
--- a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
index b8c7818..8b0e3bf 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
index 8b23591..3a14dbe 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: newParent
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
index ddf9268..17c07e8 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
index 34d667a..11d0831 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
index 56bdd89..329d277 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
index 080e833..807eec9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index 7da80b3..5725320 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 640
diff --git a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
index 088c608..621adf0 100644
--- a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/script.qml b/tests/auto/declarative/qdeclarativestates/data/script.qml
index 3c5f33e..cdb6be1 100644
--- a/tests/auto/declarative/qdeclarativestates/data/script.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/script.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
index 5ba1566..c4ab96c 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
index 527e165..65a8cea 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
index 702fa86..8a0b51a 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
index 7369c63..08d0795 100644
--- a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property bool condition1: false
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 578bcb4..a016fa7 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -68,8 +68,6 @@ private:
int m_prop;
};
-QML_DECLARE_TYPE(MyRect)
-
class tst_qdeclarativestates : public QObject
{
@@ -522,7 +520,7 @@ void tst_qdeclarativestates::parentChangeErrors()
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QTest::ignoreMessage(QtWarningMsg, QByteArray("QML ParentChange (" + fullDataPath("/data/parentChange4.qml") + ":25:9) Unable to preserve appearance under non-uniform scale").constData());
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange4.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under non-uniform scale");
rect->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
@@ -538,7 +536,7 @@ void tst_qdeclarativestates::parentChangeErrors()
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QTest::ignoreMessage(QtWarningMsg, QByteArray("QML ParentChange (" + fullDataPath("/data/parentChange5.qml") + ":25:9) Unable to preserve appearance under complex transform").constData());
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange5.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under complex transform");
rect->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
@@ -568,10 +566,10 @@ void tst_qdeclarativestates::anchorChanges()
rect->setState("right");
QCOMPARE(innerRect->x(), qreal(150));
- QCOMPARE(aChanges->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->anchors()->right().item, rect->right().item);
- QCOMPARE(aChanges->anchors()->right().anchorLine, rect->right().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
+ QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item);
+ QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine);
rect->setState("");
QCOMPARE(innerRect->x(), qreal(5));
@@ -591,7 +589,6 @@ void tst_qdeclarativestates::anchorChanges2()
QVERIFY(innerRect != 0);
rect->setState("right");
- QEXPECT_FAIL("", "QTBUG-5338", Continue);
QCOMPARE(innerRect->x(), qreal(150));
rect->setState("");
@@ -627,14 +624,14 @@ void tst_qdeclarativestates::anchorChanges3()
rect->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->anchors()->left().item, leftGuideline->left().item);
- QCOMPARE(aChanges->anchors()->left().anchorLine, leftGuideline->left().anchorLine);
- QCOMPARE(aChanges->anchors()->right().item, rect->right().item);
- QCOMPARE(aChanges->anchors()->right().anchorLine, rect->right().anchorLine);
- QCOMPARE(aChanges->anchors()->top().item, rect->top().item);
- QCOMPARE(aChanges->anchors()->top().anchorLine, rect->top().anchorLine);
- QCOMPARE(aChanges->anchors()->bottom().item, bottomGuideline->bottom().item);
- QCOMPARE(aChanges->anchors()->bottom().anchorLine, bottomGuideline->bottom().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->left().item, leftGuideline->left().item);
+ QCOMPARE(aChanges->object()->anchors()->left().anchorLine, leftGuideline->left().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item);
+ QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->top().item, rect->top().item);
+ QCOMPARE(aChanges->object()->anchors()->top().anchorLine, rect->top().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->bottom().item, bottomGuideline->bottom().item);
+ QCOMPARE(aChanges->object()->anchors()->bottom().anchorLine, bottomGuideline->bottom().anchorLine);
QCOMPARE(innerRect->x(), qreal(10));
QCOMPARE(innerRect->y(), qreal(0));
@@ -677,10 +674,10 @@ void tst_qdeclarativestates::anchorChanges4()
rect->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
- QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
- QCOMPARE(aChanges->anchors()->verticalCenter().item, leftGuideline->verticalCenter().item);
- QCOMPARE(aChanges->anchors()->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
+ QCOMPARE(aChanges->object()->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
+ QCOMPARE(aChanges->object()->anchors()->verticalCenter().item, leftGuideline->verticalCenter().item);
+ QCOMPARE(aChanges->object()->anchors()->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine);
delete rect;
}
@@ -712,10 +709,10 @@ void tst_qdeclarativestates::anchorChanges5()
rect->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
- QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
- QCOMPARE(aChanges->anchors()->baseline().item, leftGuideline->baseline().item);
- QCOMPARE(aChanges->anchors()->baseline().anchorLine, leftGuideline->baseline().anchorLine);
+ //QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
+ //QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
+ //QCOMPARE(aChanges->anchors()->baseline().item, leftGuideline->baseline().item);
+ //QCOMPARE(aChanges->anchors()->baseline().anchorLine, leftGuideline->baseline().anchorLine);
delete rect;
}
@@ -813,8 +810,8 @@ void tst_qdeclarativestates::propertyErrors()
QCOMPARE(rect->color(),QColor("red"));
- QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/propertyErrors.qml") + ":8:9) Cannot assign to non-existent property \"colr\"").constData());
- QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/propertyErrors.qml") + ":8:9) Cannot assign to read-only property \"wantsFocus\"").constData());
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"wantsFocus\"");
rect->setState("blue");
}
@@ -946,7 +943,7 @@ void tst_qdeclarativestates::illegalTempState()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QTest::ignoreMessage(QtWarningMsg, "Can't apply a state change as part of a state definition. ");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML StateGroup: Can't apply a state change as part of a state definition.");
rect->setState("placed");
QCOMPARE(rect->state(), QLatin1String("placed"));
}
@@ -959,7 +956,7 @@ void tst_qdeclarativestates::nonExistantProperty()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/nonExistantProp.qml") + ":9:9) Cannot assign to non-existent property \"colr\"").constData());
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/nonExistantProp.qml") + ":9:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
rect->setState("blue");
QCOMPARE(rect->state(), QLatin1String("blue"));
}
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml
index 5aeea56..877222f 100644
--- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
text: "<img src='http/exists.png'>"
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml
index 17bb21c..abc7077 100644
--- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
text: "<img src='http/notexists.png'>"
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml
index 53b0266..b6ca3e3 100644
--- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
text: "<img src='http://127.0.0.1:14453/exists.png'>"
diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml
index 48c7a95..fbfce9a 100644
--- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml
+++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
text: "<img src='http://127.0.0.1:14453/notexists.png'>"
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index edb4a32..551e17b 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -871,10 +871,10 @@ void tst_qdeclarativetext::embeddedImages_data()
QTest::addColumn<QString>("error");
QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocal.qml") << "";
QTest::newRow("local-error") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocalError.qml")
- << "QML Text ("+QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocalError.qml").toString()+":3:1) Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/http/notexists.png").toString();
+ << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesLocalError.qml").toString()+":3:1: QML Text: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/http/notexists.png").toString();
QTest::newRow("remote") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemote.qml") << "";
QTest::newRow("remote-error") << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemoteError.qml")
- << "QML Text ("+QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemoteError.qml").toString()+":3:1) Error downloading http://127.0.0.1:14453/notexists.png - server replied: Not found";
+ << QUrl::fromLocalFile(SRCDIR "/data/embeddedImagesRemoteError.qml").toString()+":3:1: QML Text: Error downloading http://127.0.0.1:14453/notexists.png - server replied: Not found";
}
void tst_qdeclarativetext::embeddedImages()
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml
index e5df8f1..586e606 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
TextEdit { text: "Hello world!"; id: textEditObject; objectName: "textEditObject"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml
index 34b3883..b5c807e 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item{
Fungus{
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml
index 718cb71..df843d8 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
objectName: "delegateOkay"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml
index 3c31e11..1b41f8f 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml
index a44aec2..51be3cf 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml
index 57d3e47..30c3fbd 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
index a44e867..a1ca58a 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml
index ddbf526..8dfac48 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml
index ddbf526..8dfac48 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml
index c3d4c16..8067edb 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
TextEdit {
text: "Hello world!"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
index 1aed8d8..7772687 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property variant myInput: input
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
index 69a6479..a68e4b4 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property variant myInput: input
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 25101ba..3307b7c 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -649,7 +649,7 @@ void tst_qdeclarativetextedit::delegateLoading_data()
// import installed
QTest::newRow("pass") << "cursorHttpTestPass.qml" << "";
- QTest::newRow("fail1") << "cursorHttpTestFail1.qml" << ":-1: Network error for URL http://localhost:42332/FailItem.qml ";
+ QTest::newRow("fail1") << "cursorHttpTestFail1.qml" << "<Unknown File>: Network error for URL http://localhost:42332/FailItem.qml ";
QTest::newRow("fail2") << "cursorHttpTestFail2.qml" << "http://localhost:42332/ErrItem.qml:4:5: Fungus is not a type ";
}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml
index ddc98cc..f0d1be5 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { width: 300; height: 300; color: "white"
TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml
index b404682..da6b81f 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
TextInput {
text: "Hello world!"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml
index 08a857c..141c243 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
TextInput{
focus: true
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml
index 7cbeadd..c3d5994 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
TextInput{
focus: true
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
index 04f06da..58866b7 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property variant myInput: input
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
index 41e8b59..b10ea81 100644
--- a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
+++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property variant myInput: input
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index a08a91c..da2d173 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -43,6 +43,7 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <private/qdeclarativetimer_p.h>
+#include <QtDeclarative/qdeclarativeitem.h>
#include <QDebug>
class tst_qdeclarativetimer : public QObject
@@ -60,6 +61,7 @@ private slots:
void triggeredOnStartRepeat();
void changeDuration();
void restart();
+ void parentProperty();
};
class TimerHelper : public QObject
@@ -317,6 +319,21 @@ void tst_qdeclarativetimer::restart()
delete timer;
}
+void tst_qdeclarativetimer::parentProperty()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.7\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile(""));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeTimer *timer = item->findChild<QDeclarativeTimer*>("timer");
+ QVERIFY(timer != 0);
+
+ QVERIFY(timer->isRunning());
+
+ delete timer;
+}
+
QTEST_MAIN(tst_qdeclarativetimer)
#include "tst_qdeclarativetimer.moc"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml
index 2697bb5..52591b1 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml
index 478104e1..35005fe 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml
index d35c72e..4ae45a4 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
index 7c22775..69b5bfd 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
import "deletedObject.js" as JS
MyTypeObject {
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
index 3be5099..b6767b0 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
font.capitalization: Font.AllUppercase
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
index 6b494e4..4227ebf 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6 as MyQt
+import Qt 4.7 as MyQt
MyTypeObject {
font.capitalization: MyQt.Font.AllUppercase
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml
index 4c12f21..cc51c31 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Test 1.0
Item {
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml
index 185e7ba..0615300 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
property bool test1: false;
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml
index 96592eb..e962ab0 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Test 1.0
MyTypeObject {
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml
index 8ae2ef8..045fc51 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml
@@ -1,5 +1,5 @@
import Test 1.0
-import Qt 4.6
+import Qt 4.7
MyTypeObject {
Component.onCompleted: {
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
index dd13429..8a9b981 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
@@ -133,7 +133,6 @@ signals:
public slots:
QSize method() { return QSize(13, 14); }
};
-QML_DECLARE_TYPE(MyTypeObject);
class MyConstantValueSource : public QObject, public QDeclarativePropertyValueSource
{
@@ -142,7 +141,6 @@ class MyConstantValueSource : public QObject, public QDeclarativePropertyValueSo
public:
virtual void setTarget(const QDeclarativeProperty &p) { p.write(3345); }
};
-QML_DECLARE_TYPE(MyConstantValueSource);
class MyOffsetValueInterceptor : public QObject, public QDeclarativePropertyValueInterceptor
{
@@ -155,7 +153,6 @@ public:
private:
QDeclarativeProperty prop;
};
-QML_DECLARE_TYPE(MyOffsetValueInterceptor);
void registerTypes();
diff --git a/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml b/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml
new file mode 100644
index 0000000..27c8454
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml
@@ -0,0 +1,5 @@
+import Qt 4.7
+Item {
+ width: 200
+ height: 200
+}
diff --git a/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml b/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml
new file mode 100644
index 0000000..964810c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml
@@ -0,0 +1,5 @@
+import Qt 4.7
+QGraphicsWidget {
+ width: 200
+ height: 200
+}
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
new file mode 100644
index 0000000..d6be728
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeview.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
new file mode 100644
index 0000000..1ed51c1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QSignalSpy>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+#include <QtGui/qgraphicswidget.h>
+
+class tst_QDeclarativeView : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeView();
+
+private slots:
+ void resizemodedeclarativeitem();
+ void resizemodegraphicswidget();
+
+private:
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &objectName);
+};
+
+
+tst_QDeclarativeView::tst_QDeclarativeView()
+{
+}
+
+void tst_QDeclarativeView::resizemodedeclarativeitem()
+{
+ QWidget window;
+ QDeclarativeView *canvas = new QDeclarativeView(&window);
+ QVERIFY(canvas);
+ QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize)));
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml"));
+ QDeclarativeItem* declarativeItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(declarativeItem);
+ window.show();
+
+ // initial size from root object
+ QCOMPARE(declarativeItem->width(), 200.0);
+ QCOMPARE(declarativeItem->height(), 200.0);
+ QCOMPARE(canvas->size(), QSize(200, 200));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 1);
+
+ // size update from view
+ canvas->resize(QSize(80,100));
+ QCOMPARE(declarativeItem->width(), 80.0);
+ QCOMPARE(declarativeItem->height(), 100.0);
+ QCOMPARE(canvas->size(), QSize(80, 100));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 2);
+
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+
+ // size update from view disabled
+ canvas->resize(QSize(60,80));
+ QCOMPARE(declarativeItem->width(), 80.0);
+ QCOMPARE(declarativeItem->height(), 100.0);
+ QCOMPARE(canvas->size(), QSize(60, 80));
+ QCOMPARE(sceneResizedSpy.count(), 3);
+
+ // size update from root object
+ declarativeItem->setWidth(250);
+ declarativeItem->setHeight(350);
+ qApp->processEvents();
+ QCOMPARE(declarativeItem->width(), 250.0);
+ QCOMPARE(declarativeItem->height(), 350.0);
+ QCOMPARE(canvas->size(), QSize(250, 350));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 4);
+
+ // reset canvas
+ window.hide();
+ delete canvas;
+ canvas = new QDeclarativeView(&window);
+ QVERIFY(canvas);
+ QSignalSpy sceneResizedSpy2(canvas, SIGNAL(sceneResized(QSize)));
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml"));
+ declarativeItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(declarativeItem);
+ window.show();
+
+ // initial size for root object
+ QCOMPARE(declarativeItem->width(), 200.0);
+ QCOMPARE(declarativeItem->height(), 200.0);
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 1);
+
+ // size update from root object
+ declarativeItem->setWidth(80);
+ declarativeItem->setHeight(100);
+ qApp->processEvents();
+ QCOMPARE(declarativeItem->width(), 80.0);
+ QCOMPARE(declarativeItem->height(), 100.0);
+ QCOMPARE(canvas->size(), QSize(80, 100));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 2);
+
+ // size update from root object disabled
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ declarativeItem->setWidth(60);
+ declarativeItem->setHeight(80);
+ QCOMPARE(canvas->width(), 80);
+ QCOMPARE(canvas->height(), 100);
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 2);
+
+ // size update from view
+ canvas->resize(QSize(200,300));
+ QCOMPARE(declarativeItem->width(), 200.0);
+ QCOMPARE(declarativeItem->height(), 300.0);
+ QCOMPARE(canvas->size(), QSize(200, 300));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 3);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeView::resizemodegraphicswidget()
+{
+ QWidget window;
+ QDeclarativeView *canvas = new QDeclarativeView(&window);
+ QVERIFY(canvas);
+ QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize)));
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodegraphicswidget.qml"));
+ QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(canvas->rootObject());
+ QVERIFY(graphicsWidget);
+ window.show();
+
+ // initial size from root object
+ QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0));
+ QCOMPARE(canvas->size(), QSize(200, 200));
+ QCOMPARE(canvas->size(), QSize(200, 200));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 1);
+
+ // size update from view
+ canvas->resize(QSize(80,100));
+ QCOMPARE(graphicsWidget->size(), QSizeF(80.0,100.0));
+ QCOMPARE(canvas->size(), QSize(80,100));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 2);
+
+ // size update from view disabled
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+ canvas->resize(QSize(60,80));
+ QCOMPARE(graphicsWidget->size(), QSizeF(80.0,100.0));
+ QCOMPARE(canvas->size(), QSize(60, 80));
+ QCOMPARE(sceneResizedSpy.count(), 3);
+
+ // size update from root object
+ graphicsWidget->resize(QSizeF(250.0, 350.0));
+ QCOMPARE(graphicsWidget->size(), QSizeF(250.0,350.0));
+ QCOMPARE(canvas->size(), QSize(250, 350));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy.count(), 4);
+
+ // reset canvas
+ window.hide();
+ delete canvas;
+ canvas = new QDeclarativeView(&window);
+ QVERIFY(canvas);
+ QSignalSpy sceneResizedSpy2(canvas, SIGNAL(sceneResized(QSize)));
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodegraphicswidget.qml"));
+ graphicsWidget = qobject_cast<QGraphicsWidget*>(canvas->rootObject());
+ QVERIFY(graphicsWidget);
+ window.show();
+
+ // initial size from root object
+ QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0));
+ QCOMPARE(canvas->size(), QSize(200, 200));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 1);
+
+ // size update from root object
+ graphicsWidget->resize(QSizeF(80, 100));
+ QCOMPARE(graphicsWidget->size(), QSizeF(80.0, 100.0));
+ QCOMPARE(canvas->size(), QSize(80, 100));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 2);
+
+ // size update from root object disabled
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ graphicsWidget->resize(QSizeF(60,80));
+ QCOMPARE(canvas->size(), QSize(80,100));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 2);
+
+ // size update from view
+ canvas->resize(QSize(200,300));
+ QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 300.0));
+ QCOMPARE(canvas->size(), QSize(200, 300));
+ QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(sceneResizedSpy2.count(), 3);
+
+ window.show();
+ delete canvas;
+}
+
+template<typename T>
+T *tst_QDeclarativeView::findItem(QGraphicsObject *parent, const QString &objectName)
+{
+ if (!parent)
+ return 0;
+
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->QGraphicsObject::children().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName))
+ return static_cast<T*>(item);
+ item = findItem<T>(item, objectName);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+QTEST_MAIN(tst_QDeclarativeView)
+
+#include "tst_qdeclarativeview.moc"
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml
new file mode 100644
index 0000000..d70f82b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml
@@ -0,0 +1,11 @@
+import Qt 4.7
+
+VisualDataModel {
+ function setRoot() {
+ rootIndex = modelIndex(0);
+ }
+ function setRootToParent() {
+ rootIndex = parentModelIndex();
+ }
+ model: myModel
+}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
new file mode 100644
index 0000000..d76b582
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -0,0 +1,11 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativevisualdatamodel.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
new file mode 100644
index 0000000..7de15a3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QSignalSpy>
+#include <QStandardItemModel>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <private/qdeclarativevisualitemmodel_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include <math.h>
+
+static void initStandardTreeModel(QStandardItemModel *model)
+{
+ QStandardItem *item;
+ item = new QStandardItem(QLatin1String("Row 1 Item"));
+ model->insertRow(0, item);
+
+ item = new QStandardItem(QLatin1String("Row 2 Item"));
+ item->setCheckable(true);
+ model->insertRow(1, item);
+
+ QStandardItem *childItem = new QStandardItem(QLatin1String("Row 2 Child Item"));
+ item->setChild(0, childItem);
+
+ item = new QStandardItem(QLatin1String("Row 3 Item"));
+ item->setIcon(QIcon());
+ model->insertRow(2, item);
+}
+
+class tst_qdeclarativevisualdatamodel : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativevisualdatamodel();
+
+private slots:
+ void rootIndex();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativevisualdatamodel::tst_qdeclarativevisualdatamodel()
+{
+}
+
+void tst_qdeclarativevisualdatamodel::rootIndex()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/visualdatamodel.qml"));
+
+ QStandardItemModel model;
+ initStandardTreeModel(&model);
+
+ engine.rootContext()->setContextProperty("myModel", &model);
+
+ QDeclarativeVisualDataModel *obj = qobject_cast<QDeclarativeVisualDataModel*>(c.create());
+ QVERIFY(obj != 0);
+
+ QMetaObject::invokeMethod(obj, "setRoot");
+ QVERIFY(qvariant_cast<QModelIndex>(obj->rootIndex()) == model.index(0,0));
+
+ QMetaObject::invokeMethod(obj, "setRootToParent");
+ QVERIFY(qvariant_cast<QModelIndex>(obj->rootIndex()) == QModelIndex());
+
+ delete obj;
+}
+
+
+QTEST_MAIN(tst_qdeclarativevisualdatamodel)
+
+#include "tst_qdeclarativevisualdatamodel.moc"
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.qml b/tests/auto/declarative/qdeclarativewebview/data/basic.qml
index f0b41ef..a5a8d34 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/basic.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/basic.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.qml b/tests/auto/declarative/qdeclarativewebview/data/elements.qml
index 16e5788..5af76ed 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/elements.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/elements.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
index 0e92e0e..4141166 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
index f827238..2061b5f 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
index 5f9f757..d066c07 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
@@ -1,6 +1,6 @@
// Demonstrates opening new WebViews from HTML
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Grid {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
index 0770acf..45684ff 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Item {
diff --git a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
index 9e17597..b14bcf9 100644
--- a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
+++ b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
index ca989f8..5c7a5ff 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
WorkerScript {
id: worker
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
index 729793e..24e4071 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string urlDummy
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
index 33ca020..e78ce63 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url: "testdocument.html"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
index c0957ed..79d1355 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url: "testdocument.html"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
index 0b4badc..81d8e1d 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlTest: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml
index 9255922..cee07d6 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
id: obj
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
index 928e514..49bfebd 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlTest: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml
index 93e44fd..ab033a5 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool calledAsConstructor
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml
index 4dcf6f9..d66f283 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int readyState
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
index 682ea9f..1df43ef 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlTest: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml
index de5ee4f..827ff3f 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int index_size_err: DOMException.INDEX_SIZE_ERR
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
index 200214f..e7a3fb4 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlTest: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
index 9096999..157ae81 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml
index 37124c7..7008224 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml
index 505e4b1..ff58710 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml
index 20fb040..d6256ed 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
index 7a65e25..0f3cdef 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml
index d5aa4b1..a7a8bba 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml
index 7538ffd..fc0f757 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml
index 3b55802..c5507a8 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml
index b8d01c4..d3cc845 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int unsent
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml
index b30989b..8c603a4 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool onreadystatechange: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
index 72fb9d7..24bde60 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml
index b6d4c32..86a6ac9 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml
index 8c86c20..198219c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
index 69f79ae..dacc484 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml
index 1477279..d38380b 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
index b07f8e7..2c072e4 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml
index 983ea14..825ad60 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml
index 6b345cc..cb8f869 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml
index c0321dc..f895a8c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml
index f6fabdb..268966e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
index 9fa4847..22a9b96 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml
index 63f288e..d754921 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlNull: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
index a9ef3e8..8f69a94 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool dataOK: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
index 171e0b1..7ab53d3 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
index 09b742b..3a48e28 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
index 8786917..c68b821 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
index 6789480..8fee2cd 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
index 08d999d..ea214fa 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
index e047fc8..524622c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
index ba0db25..a4828cd 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
index ddf520e..a1f46e2 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string reqType
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml
index 7f51ecf..0efa40a 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
index 61eea33..b252f4a 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml
index 8305ae1..e83cb72 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool exceptionThrown: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
index b22b239..3f9041c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
index 666c791..b15b404 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml
index 30bc93e..aadc580 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool test: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml
index ec1c5d8..97d42ac 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int unsent: XMLHttpRequest.UNSENT
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
index c903e12..e28add2 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
index a3b98be..a44c6ba 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property string url
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
index 0eb31d5..63bfb08 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool xmlTest: false
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
index 63165ab..a54ef4a 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property bool dataOK: false
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml
index 2cbb027..8354193 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "model.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml
index 140e0ad..09077b6 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "model.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
index 737ec81..b014aa3 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "model.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml
index 13dea91..59b8ddc 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "recipes.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml
index 26c533f..a905963 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "model.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
index b90e57e..eaf5f0a 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
query: "/data/item"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml
index ed0f293..3aa7b1f3 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
XmlListModel {
source: "model.xml"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index cf7e357..831e318 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -222,7 +222,7 @@ void tst_qdeclarativexmllistmodel::roles()
void tst_qdeclarativexmllistmodel::roleErrors()
{
QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleErrors.qml"));
- QTest::ignoreMessage(QtWarningMsg, QString("QML XmlRole (" + QUrl::fromLocalFile(SRCDIR "/data/roleErrors.qml").toString() + ":6:5) An XmlRole query must not start with '/'").toUtf8().constData());
+ QTest::ignoreMessage(QtWarningMsg, (QUrl::fromLocalFile(SRCDIR "/data/roleErrors.qml").toString() + ":6:5: QML XmlRole: An XmlRole query must not start with '/'").toUtf8().constData());
//### make sure we receive all expected warning messages.
QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
QVERIFY(model != 0);
@@ -247,7 +247,7 @@ void tst_qdeclarativexmllistmodel::roleErrors()
void tst_qdeclarativexmllistmodel::uniqueRoleNames()
{
QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/unique.qml"));
- QTest::ignoreMessage(QtWarningMsg, QString("QML XmlRole (" + QUrl::fromLocalFile(SRCDIR "/data/unique.qml").toString() + ":7:5) \"name\" duplicates a previous role name and will be disabled.").toUtf8().constData());
+ QTest::ignoreMessage(QtWarningMsg, (QUrl::fromLocalFile(SRCDIR "/data/unique.qml").toString() + ":7:5: QML XmlRole: \"name\" duplicates a previous role name and will be disabled.").toUtf8().constData());
QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
QVERIFY(model != 0);
QTRY_COMPARE(model->count(), 9);
diff --git a/tests/auto/declarative/qmlvisual/ListView/basic1.qml b/tests/auto/declarative/qmlvisual/ListView/basic1.qml
index 3c371a6..c67aaaa 100644
--- a/tests/auto/declarative/qmlvisual/ListView/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/basic1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/ListView/basic2.qml b/tests/auto/declarative/qmlvisual/ListView/basic2.qml
index bdba65e..73c1b9a 100644
--- a/tests/auto/declarative/qmlvisual/ListView/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/basic2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/ListView/basic3.qml b/tests/auto/declarative/qmlvisual/ListView/basic3.qml
index 2d68c0a..44f74a5 100644
--- a/tests/auto/declarative/qmlvisual/ListView/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/basic3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/ListView/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/basic4.qml
index 7c68df1..e5d097b 100644
--- a/tests/auto/declarative/qmlvisual/ListView/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/basic4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml
index 83b700d..3373247 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml
index 1483512..20b889d 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml
index bf68998..f49de2f 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml
index 4aa9ab6..1ea5547 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml
index 073749f..829fbb3 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml b/tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml
index 3765668..f47179d 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml
index ae59b14..b291ea4 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml
index ff19d22..e32e9e6 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml
index 2f33cae..ed0c53b 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml
index 4b1c5cf..a70b741 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/basic1.qml b/tests/auto/declarative/qmlvisual/ListView/data/basic1.qml
index 4cd44fc..7aadf36 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/basic2.qml b/tests/auto/declarative/qmlvisual/ListView/data/basic2.qml
index 34ad5ed..5624d6b 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/basic3.qml b/tests/auto/declarative/qmlvisual/ListView/data/basic3.qml
index 1c5ddb0..16a8329 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/data/basic4.qml
index d121d91..23cc255 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml b/tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml
index 073749f..829fbb3 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/data/listview.qml b/tests/auto/declarative/qmlvisual/ListView/data/listview.qml
index cd5d7b4..bf64029 100644
--- a/tests/auto/declarative/qmlvisual/ListView/data/listview.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/data/listview.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/ListView/itemlist.qml b/tests/auto/declarative/qmlvisual/ListView/itemlist.qml
index 8cbbdb0..2a00397 100644
--- a/tests/auto/declarative/qmlvisual/ListView/itemlist.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/itemlist.qml
@@ -1,7 +1,7 @@
// This example demonstrates placing items in a view using
// a VisualItemModel
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightgray"
diff --git a/tests/auto/declarative/qmlvisual/ListView/listview.qml b/tests/auto/declarative/qmlvisual/ListView/listview.qml
index fb9eecd..6e0b47a 100644
--- a/tests/auto/declarative/qmlvisual/ListView/listview.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/listview.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 600; height: 300; color: "white"
diff --git a/tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml b/tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml
index d062667..08cb46b 100644
--- a/tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml
+++ b/tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
index 7ccba10..9db0f0d 100644
--- a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
+++ b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml
index 70c14cf..406e10b 100644
--- a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml
index 8297c5a..dbe0276 100644
--- a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml
+++ b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml
index f205ae8..49730fc 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: mainrect
diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml
index 4ab94f3..9611d27 100644
--- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/data/colorAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml b/tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml
index d8e8688..5923222 100644
--- a/tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml
+++ b/tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/easing/easing.qml b/tests/auto/declarative/qmlvisual/animation/easing/easing.qml
index 4248d88..d42f069 100644
--- a/tests/auto/declarative/qmlvisual/animation/easing/easing.qml
+++ b/tests/auto/declarative/qmlvisual/animation/easing/easing.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: item
diff --git a/tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml b/tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml
index 8804d44..58d0b26 100644
--- a/tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml
+++ b/tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/loop/loop.qml b/tests/auto/declarative/qmlvisual/animation/loop/loop.qml
index 5389b26..78fbc68 100644
--- a/tests/auto/declarative/qmlvisual/animation/loop/loop.qml
+++ b/tests/auto/declarative/qmlvisual/animation/loop/loop.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: wrapper
diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml
index 5f5b8fc..8fd5944 100644
--- a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml
index ba606f4..7e0374c 100644
--- a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test verifies that a single animation animating two properties is visually the same as two
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml
index 5718560..edefd01 100644
--- a/tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml
index 8d0b375..b30281d 100644
--- a/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test shows a green rectangle moving and growing from the upper-left corner
diff --git a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml
index 73c6542..8e1e1d7 100644
--- a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
index 8830170..d82c6df 100644
--- a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test shows a bouncing logo.
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml
index 0a9057e..36b39fa 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml
index 5651b87..89c2c5b 100644
--- a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test starts with a red rectangle at 0,0. It should animate a color change to blue,
diff --git a/tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml b/tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml
index a130b75..b4ee569 100644
--- a/tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml
+++ b/tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml b/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml
index 1d0495e..7a10db1 100644
--- a/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml
+++ b/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml
index 01da490..d1de5d0 100644
--- a/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml
index dc2fcee..5008356 100644
--- a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test starts with a red rectangle at 0,0. It should animate moving 50 pixels right,
diff --git a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png
index 9c9ceae..02fa5c9 100644
--- a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png
+++ b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
index 08ed609..b1871ce 100644
--- a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
+++ b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
@@ -7,5 +7,5 @@ VisualTest {
Frame {
msec: 16
image: "fillmode.0.png"
- }
+ }
}
diff --git a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
index 7c3b486..817ccc0 100644
--- a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
+++ b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This is a static display test of the various Image fill modes. See the png file in the data
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml
index 44900fc..ee9a550 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml
index 7837ad9..5d84bfe 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml
index 7308a23..cd73a3c 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml
index 93189fa..8d36200 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml
index 7170907..813665d 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml
index b1f628f..0fba451 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data/test.qml b/tests/auto/declarative/qmlvisual/focusscope/data/test.qml
index d86c034..460ba1a 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data/test.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data/test.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/data/test2.qml
index fedc96a..03ece10 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data/test2.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data/test2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/data/test3.qml b/tests/auto/declarative/qmlvisual/focusscope/data/test3.qml
index 8ce7944..dd48e39 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/data/test3.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/data/test3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/focusscope/test.qml b/tests/auto/declarative/qmlvisual/focusscope/test.qml
index 401c7dc..d83bad4 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/test.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/test.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qmlvisual/focusscope/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/test2.qml
index 5b6971a..7a6ed83 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/test2.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/test2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qmlvisual/focusscope/test3.qml b/tests/auto/declarative/qmlvisual/focusscope/test3.qml
index a8bb523..7535c31 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/test3.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/test3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml
index 0ceaf49..fdb4da3 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml
index 29c02b3..730aeca 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml
index 9879416..8956128 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml
index 58d03a6..ce0c38c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property alias horizontalMode: image.horizontalTileMode
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
index c6df3c4..e974234 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml
index 29e591a..630a6d2 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
index 1403d35..eb40fcb 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
@@ -6,6 +6,6 @@ VisualTest {
}
Frame {
msec: 16
- hash: "258a7e75b491e4f51a91739c776803b3"
+ image: "borders.0.png"
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml
index 46086f9..289af88 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml
index db70298..a5ca451 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml
index 50ba9ad..175a891 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightSteelBlue"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml
index ebb963d..d845353 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightSteelBlue"
@@ -15,7 +15,7 @@ Rectangle {
ListElement { dayColor: "orange" }
}
- flickable {
+ Flickable {
id: flick
height: parent.height-50
width: parent.width; contentHeight: column.height
@@ -33,7 +33,6 @@ Rectangle {
}
}
clip: true
- reportedVelocitySmoothing: 1000
}
Rectangle {
radius: 3
@@ -77,7 +76,7 @@ Rectangle {
color: "yellow"
MouseArea {
anchors.fill: parent
- onClicked: flick.overShoot = flick.overShoot > 0 ? 0 : 30
+ onClicked: flick.boundsBehavior = flick.boundsBehavior == Flickable.StopAtBounds ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml
index 520d9a2..d2d46e4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.qml
new file mode 100644
index 0000000..d1a5ade
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.qml
@@ -0,0 +1,207 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "04382a80a203e1fe3d0d4944c9195e0b"
+ }
+ Frame {
+ msec: 32
+ hash: "8d8c6a3c37ba3cb77afcc7ed4234d40f"
+ }
+ Frame {
+ msec: 48
+ hash: "93ab01494e2229c0921c25d3acbcffe6"
+ }
+ Frame {
+ msec: 64
+ hash: "5036bf3c842e5ad09b7bac5512e433ad"
+ }
+ Frame {
+ msec: 80
+ hash: "ef02ef4598fbe6390391b7f2c17ec99d"
+ }
+ Frame {
+ msec: 96
+ hash: "7fa83afca86cfec48a4986ba3df08e3b"
+ }
+ Frame {
+ msec: 112
+ hash: "d9388827bd7755bb9bc1ef78507cc0ac"
+ }
+ Frame {
+ msec: 128
+ hash: "d18778f4f748f7ee54404db334831ff7"
+ }
+ Frame {
+ msec: 144
+ hash: "fee69ae3b4d79b795d4443b055a8a91a"
+ }
+ Frame {
+ msec: 160
+ hash: "f80fa0131c859286e900071b51e74784"
+ }
+ Frame {
+ msec: 176
+ hash: "b654e51ea71ec118e6b985743281b6a1"
+ }
+ Frame {
+ msec: 192
+ hash: "91c771226e9c97e0f00c6f7c6fc6c95c"
+ }
+ Frame {
+ msec: 208
+ hash: "0f612f81541b093442e68d99e00c288c"
+ }
+ Frame {
+ msec: 224
+ hash: "246b619598606fef9f0442439cee4ec6"
+ }
+ Frame {
+ msec: 240
+ hash: "1d2f34459b2128877218cef340f46f06"
+ }
+ Frame {
+ msec: 256
+ hash: "af3c2eef734da05d45484bbb19646425"
+ }
+ Frame {
+ msec: 272
+ hash: "85dfe5680e47919500728de6e93c8290"
+ }
+ Frame {
+ msec: 288
+ hash: "8fd7d439bafa07461a65a3c97cf8602a"
+ }
+ Frame {
+ msec: 304
+ hash: "1ebf543a84aae4abfd480f24ad362cb0"
+ }
+ Frame {
+ msec: 320
+ hash: "60a9c9300981282986659e7c73d381b0"
+ }
+ Frame {
+ msec: 336
+ hash: "686f3ff048f2b214033988d989ed087a"
+ }
+ Frame {
+ msec: 352
+ hash: "24694e17476b0ffe9848159aa282e931"
+ }
+ Frame {
+ msec: 368
+ hash: "c05e1bdf62e3e58972f868b930823a58"
+ }
+ Frame {
+ msec: 384
+ hash: "cbc1a3c78b8f79047d1221d5ae06f0f8"
+ }
+ Frame {
+ msec: 400
+ hash: "05ad366e74bf30b1619cf2ef1f530d82"
+ }
+ Frame {
+ msec: 416
+ hash: "4c5c536f2c03ecfb7d3d8f56638001ec"
+ }
+ Frame {
+ msec: 432
+ hash: "9754048ffcb7863a8a676e5bee4a7991"
+ }
+ Frame {
+ msec: 448
+ hash: "047aa8203ad18023f5af340a41f1084e"
+ }
+ Frame {
+ msec: 464
+ hash: "1351b7c92cd873db387e93dc74cca848"
+ }
+ Frame {
+ msec: 480
+ hash: "4066f52fae753013396195dc98311058"
+ }
+ Frame {
+ msec: 496
+ hash: "21d969b92993e428e79babb574e9203d"
+ }
+ Frame {
+ msec: 512
+ hash: "62c00f52e8b0592fbb59f88deb3b022e"
+ }
+ Frame {
+ msec: 528
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 544
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 560
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 576
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 592
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 608
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 624
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 640
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 656
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 672
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 688
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 704
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 720
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 736
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 752
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+ Frame {
+ msec: 768
+ hash: "322719dee40d3495e9b4d2faac351e89"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml
index a27aa6e..da76ff9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 240
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml
new file mode 100644
index 0000000..fa68753
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml
@@ -0,0 +1,62 @@
+import Qt 4.7
+Item { //realWindow
+ width: 370
+ height: 480
+ Item {
+ id: window
+ NumberAnimation on width{ from:320; to:370; duration: 500 }
+ NumberAnimation on height{ from:480; to:320; duration: 500 }
+ Flipable {
+ id: flipable
+ x: 0
+ y: window.height / 3.0 - 40
+ width: parent.width
+ height: parent.height
+ transform: Rotation {
+ id: transform
+ origin.x: window.width / 2.0
+ origin.y: 0
+ origin.z: 0
+ axis.x: 0
+ axis.y: 1
+ axis.z: 0
+ angle: 0;
+ }
+ front: Rectangle{
+ width: parent.width
+ height: 80
+ color: "blue"
+ }back: Rectangle{
+ width: parent.width
+ height: 80
+ color: "red"
+ }
+ }
+ Flipable {
+ id: flipableBack
+ x: 0
+ y: 2.0 * window.height / 3.0 - 40
+ width: parent.width
+ height: parent.height
+ transform: Rotation {
+ id: transformBack
+ origin.x: window.width / 2.0
+ origin.y: 0
+ origin.z: 0
+ axis.x: 0
+ axis.y: 1
+ axis.z: 0
+ angle: 180;
+ }
+ front: Rectangle{
+ width: parent.width
+ height: 80
+ color: "blue"
+ }back: Rectangle{
+ width: parent.width
+ height: 80
+ color: "red"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml
index c7ac52d..67aa10a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml
index fb5f1fb..1c90af9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml
index f8782a5..1b0bd65 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 400; color: "black"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml
index d8512eb..30e2424 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 400; color: "black"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
index f3071e4..b88bd83 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png
new file mode 100644
index 0000000..993610f
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png
new file mode 100644
index 0000000..993610f
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png
new file mode 100644
index 0000000..12c6cf5
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png
new file mode 100644
index 0000000..ccb9fdd
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png
new file mode 100644
index 0000000..ace0752
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png
new file mode 100644
index 0000000..993610f
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png
new file mode 100644
index 0000000..e58c68b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png
new file mode 100644
index 0000000..e58c68b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png
new file mode 100644
index 0000000..cb6d2f8
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png
new file mode 100644
index 0000000..db6bea2
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png
new file mode 100644
index 0000000..c18bb34
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png
new file mode 100644
index 0000000..c18bb34
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png
new file mode 100644
index 0000000..3b56301
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png
new file mode 100644
index 0000000..993610f
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml
new file mode 100644
index 0000000..307fef6
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml
@@ -0,0 +1,5127 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 32
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 48
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 64
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 80
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 96
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 112
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 128
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 144
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 160
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 176
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 192
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 208
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 224
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 240
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 256
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 272
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 288
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 304
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 320
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 336
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 352
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 368
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 384
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 400
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 416
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 432
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 448
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 464
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 480
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 496
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 512
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 528
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 544
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 560
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 576
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 592
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 608
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 624
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 640
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 656
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 672
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 688
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 704
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 720
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 736
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 752
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 768
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 784
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 800
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 816
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 832
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 848
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 864
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 880
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 896
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 912
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 928
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 944
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 960
+ image: "mousearea-flickable.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 992
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1008
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1024
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1040
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1056
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1072
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1088
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1104
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1120
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1136
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1152
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1168
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1184
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1200
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1216
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1232
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1248
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1264
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1280
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1296
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1312
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1328
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1344
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1360
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1376
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1392
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1408
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1424
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1440
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1456
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1472
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1488
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1504
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1520
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1536
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1552
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1568
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1584
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1600
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1616
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1632
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1648
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1664
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1680
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1696
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1712
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1728
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1744
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1760
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1776
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1792
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1808
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1824
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1840
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1856
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1872
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1888
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1904
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1920
+ image: "mousearea-flickable.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1952
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1968
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 1984
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2000
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2016
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2032
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2048
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2064
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2080
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2096
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2112
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2128
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2144
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2160
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2176
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2192
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2208
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2224
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2240
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2256
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2272
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2288
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2304
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2320
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2336
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2352
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2368
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2384
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2400
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2416
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2432
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2448
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2464
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2480
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2496
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2512
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2528
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2544
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2560
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2576
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2592
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 2608
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 188; y: 41
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2624
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2640
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2656
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2672
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2688
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2704
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2720
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2736
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2752
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2768
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2784
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2800
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2816
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2832
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2848
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2864
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2880
+ image: "mousearea-flickable.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2912
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2928
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2944
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2960
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2976
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 2992
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3008
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3024
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3040
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3056
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3072
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3088
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3104
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3120
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3136
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3152
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3168
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3184
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3200
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3216
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3232
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3248
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3264
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3280
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3296
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3312
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3328
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3344
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3360
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3376
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3392
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3408
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3424
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3440
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3456
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3472
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3488
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3504
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3520
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3536
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3552
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3568
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3584
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3600
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3616
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3632
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3648
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3664
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3680
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3696
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3712
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3728
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3744
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3760
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3776
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3792
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3808
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3824
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3840
+ image: "mousearea-flickable.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3872
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3888
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3904
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3920
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3936
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3952
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3968
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 3984
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4000
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4016
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4032
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4048
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4064
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4080
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4096
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4112
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4128
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4144
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4160
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4176
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4192
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4208
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4224
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4240
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4256
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4272
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4288
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4304
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4320
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4336
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4352
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4368
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4384
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4400
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4416
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4432
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4448
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4464
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4480
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4496
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Frame {
+ msec: 4512
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 42
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4528
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4544
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 45
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4560
+ hash: "4a60ab820ca66548384b2257b21de8ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4576
+ hash: "86b32befe0dada5bdce82a7dd14777ce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 51
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4592
+ hash: "7a5f69a1eecb5de0fc2295cd287eb449"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4608
+ hash: "144eeb7c2a32cedb6ebba063501c9176"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 59
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4624
+ hash: "11120d6de575ffa639b6abb3af4afef7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 61
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 62
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4640
+ hash: "ab4c936a81299adf080f3b14f7e6be49"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 64
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4656
+ hash: "6602009ffe3c0f3072640ebc8749b76f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4672
+ hash: "8517007d5102af238935e93a3b38087f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 195; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 195; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4688
+ hash: "4e129ebba85d1f3717d09f71eb5a1a7d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 79
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4704
+ hash: "82f54d7e254edcf499ea12a63118e8a7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 82
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4720
+ hash: "572cb62d69ccb973ea18d3b0eaff571b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4736
+ hash: "79650397b868019909b931a32a115823"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4752
+ hash: "43e50f4d4d37373e26af0a5d3cb64c4c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4768
+ hash: "a0f8eb8a796f67c368b0a479e8d14681"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4784
+ hash: "01bf03313a0229e810a24e2adbbe9775"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4800
+ image: "mousearea-flickable.4.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4816
+ hash: "aafb12a520eb443ee1348282f2c54e4a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4832
+ hash: "806d22bc3533c729cd10dc889c36902d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4848
+ hash: "05b3013c9e42ed9ced7009d2e2999357"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4864
+ hash: "cb49adcd2c8afe27fd5926bd622added"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 133
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 135
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4880
+ hash: "d0b4215b43403c97d83250add6d2b6db"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4896
+ hash: "ee0523fe6a33b59871ad3b311ca0cbeb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 152
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4912
+ hash: "29ca97cc573d3a1fde65320b61678c60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 161
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4928
+ hash: "021bda841eaefa76ce5e1c97150af6f6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4960
+ hash: "c09f4002ed9d41f62bb1aaff95723cce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4976
+ hash: "7bb17b13db811b02c86a24a0051336d9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4992
+ hash: "da5c33ee9e9e1d9aaa7d5efa83b8bf69"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 187
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5008
+ hash: "3ca9742356b6ff833fd287a95520174a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5024
+ hash: "d1372239a681d1fccc25257b4a02fb39"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 196
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5040
+ hash: "1f37473ab2fb0643e11e4a41a2ee4561"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 198
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5056
+ hash: "1533c6ff17e79a47a5d3510aa85bcf8a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5072
+ hash: "4cad3c6caf8d3009f63923df897c4723"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5088
+ hash: "b81183233961b34c2a3f21a249b0fbfb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5104
+ hash: "9f876eb93a16c24843dd6a5acd303ab3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5120
+ hash: "237dd62011f4253970b946b335e3fb71"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5136
+ hash: "6206ad3e633b6b1b068304caa4efe48a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 217
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5152
+ hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5168
+ hash: "d9e953d132330f8a58a190d61aec6ec3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 219
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 220
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5184
+ hash: "c1570ad4cb688ea51818e0a09e349daa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5200
+ hash: "11853dcbad9d1d9a8b7d8a4e6fcca140"
+ }
+ Frame {
+ msec: 5216
+ hash: "11853dcbad9d1d9a8b7d8a4e6fcca140"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 223
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5232
+ hash: "11853dcbad9d1d9a8b7d8a4e6fcca140"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "c6a81be579382f25ac583734897c2570"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "c6a81be579382f25ac583734897c2570"
+ }
+ Frame {
+ msec: 5280
+ hash: "c6a81be579382f25ac583734897c2570"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 226
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Frame {
+ msec: 5328
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Frame {
+ msec: 5344
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Frame {
+ msec: 5360
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 209; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5376
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Frame {
+ msec: 5392
+ hash: "c6a81be579382f25ac583734897c2570"
+ }
+ Frame {
+ msec: 5408
+ hash: "11853dcbad9d1d9a8b7d8a4e6fcca140"
+ }
+ Frame {
+ msec: 5424
+ hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b"
+ }
+ Frame {
+ msec: 5440
+ hash: "9f876eb93a16c24843dd6a5acd303ab3"
+ }
+ Frame {
+ msec: 5456
+ hash: "1533c6ff17e79a47a5d3510aa85bcf8a"
+ }
+ Frame {
+ msec: 5472
+ hash: "9a9d1e0b1d7b9291480b3ec641f354ce"
+ }
+ Frame {
+ msec: 5488
+ hash: "ee40862a59f14667c89fa62f380c10fb"
+ }
+ Frame {
+ msec: 5504
+ hash: "95b57cd3dac3bce56674f2c4143f42d4"
+ }
+ Frame {
+ msec: 5520
+ hash: "52d45e8dde81fef5ee93bbd5a40d4851"
+ }
+ Frame {
+ msec: 5536
+ hash: "05b3013c9e42ed9ced7009d2e2999357"
+ }
+ Frame {
+ msec: 5552
+ hash: "7d03030f5a672d87aeabefdf4f3a39a4"
+ }
+ Frame {
+ msec: 5568
+ hash: "79650397b868019909b931a32a115823"
+ }
+ Frame {
+ msec: 5584
+ hash: "82f54d7e254edcf499ea12a63118e8a7"
+ }
+ Frame {
+ msec: 5600
+ hash: "8517007d5102af238935e93a3b38087f"
+ }
+ Frame {
+ msec: 5616
+ hash: "dc272fc8fc98d822a154da1d495d4f7e"
+ }
+ Frame {
+ msec: 5632
+ hash: "11120d6de575ffa639b6abb3af4afef7"
+ }
+ Frame {
+ msec: 5648
+ hash: "70e522f64236dfa4e1613ffc29b4b23e"
+ }
+ Frame {
+ msec: 5664
+ hash: "7a5f69a1eecb5de0fc2295cd287eb449"
+ }
+ Frame {
+ msec: 5680
+ hash: "a569789b082296415321ba11c859abe5"
+ }
+ Frame {
+ msec: 5696
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Frame {
+ msec: 5712
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Frame {
+ msec: 5728
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 5744
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 5760
+ image: "mousearea-flickable.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 5792
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 5808
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 5824
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5840
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5856
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5872
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5888
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5904
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5920
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5936
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5952
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5968
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 5984
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6000
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6016
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6032
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6048
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6064
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6080
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6096
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6112
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6128
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6144
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6160
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6176
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6192
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6208
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6224
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6240
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6256
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6272
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6288
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6304
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6320
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6336
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6352
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 6368
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 188; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6384
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6400
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6416
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6432
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6448
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6464
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6480
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6496
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6512
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6528
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6544
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6560
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6576
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6592
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6608
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6624
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6640
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6656
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6672
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6688
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6704
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6720
+ image: "mousearea-flickable.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6752
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6768
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6784
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6800
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6816
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6832
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6848
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6864
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6880
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6896
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6912
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6928
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6944
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6960
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6976
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 6992
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7008
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7024
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7040
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7056
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7072
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7088
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7104
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7120
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7136
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7152
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7168
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7184
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7200
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7216
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7232
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7248
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7264
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7280
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7296
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7312
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7328
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7344
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7360
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7376
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7392
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7408
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7424
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7440
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7456
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7472
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7488
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7504
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7520
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7536
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7552
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7568
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7584
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7600
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7616
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7632
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7648
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7664
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7680
+ image: "mousearea-flickable.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7712
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7728
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7744
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7760
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7776
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7792
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7808
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7824
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7840
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7856
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7872
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7888
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7904
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7920
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7936
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7952
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7968
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 7984
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8000
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8016
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8032
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8048
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8064
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8080
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8096
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8112
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8128
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8144
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8160
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8176
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Frame {
+ msec: 8192
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8208
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8224
+ hash: "037386eb30a5e8d53a20a11258ee0f60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 186
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8240
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8256
+ hash: "70e522f64236dfa4e1613ffc29b4b23e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 196
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 198
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8272
+ hash: "11120d6de575ffa639b6abb3af4afef7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 201
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 203
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8288
+ hash: "dc272fc8fc98d822a154da1d495d4f7e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8304
+ hash: "4e129ebba85d1f3717d09f71eb5a1a7d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 219
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8320
+ hash: "837deeb2a92648d830acf29e829ebb53"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8336
+ hash: "7d2606d432858288dac019e0002ff85a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 231
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 234
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8352
+ hash: "c37507a29e3a6d80446ad68f2d92f266"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8368
+ hash: "01bf03313a0229e810a24e2adbbe9775"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8384
+ hash: "8ffbbed46737837e55383833b96d2624"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 248
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 251
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8400
+ hash: "6d49fc41fb6d74643c7613df7e417833"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 257
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8416
+ hash: "1978cda418856b542d7c5a155b74f09c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 259
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 262
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8432
+ hash: "cc6619c7cd6e4e274df4729aad6cca46"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8448
+ hash: "0b16e524cd5253d07aa9b5855967fa71"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 270
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8464
+ hash: "0121c18897c37481fddbac57db636a60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 275
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 278
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8480
+ hash: "091d1ad7aba4b662cba98214c98a4707"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8496
+ hash: "f334bfcc3af89bf1405762a215c54ea6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 285
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8512
+ hash: "66f71641c7a607152f140428ab9621d6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 290
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 293
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8528
+ hash: "7b41d651ad46341859d0188db341ae10"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 298
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8544
+ hash: "95b57cd3dac3bce56674f2c4143f42d4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 305
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8560
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 306
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 308
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8576
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 310
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 312
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8592
+ hash: "c09f4002ed9d41f62bb1aaff95723cce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 316
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8608
+ hash: "7bb17b13db811b02c86a24a0051336d9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 318
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 320
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8624
+ hash: "6d6cec95a6a2445d88b015ff76af032e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 322
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 324
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8640
+ image: "mousearea-flickable.8.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 328
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8656
+ hash: "9a9d1e0b1d7b9291480b3ec641f354ce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 330
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 332
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8672
+ hash: "d1372239a681d1fccc25257b4a02fb39"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 335
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 338
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8688
+ hash: "2010f6f0c34e59f505bbe1aab262b646"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 341
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 347
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8704
+ hash: "2dc2def0c748ac94d33d90d4a3610136"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 350
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 356
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8720
+ hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 358
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 360
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8736
+ hash: "c1570ad4cb688ea51818e0a09e349daa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 364
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8752
+ hash: "c6a81be579382f25ac583734897c2570"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 366
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8768
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 368
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8784
+ hash: "b34a796f25ad62f952101b296f9c2bac"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 369
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8800
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8816
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8832
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8848
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8864
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8880
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8896
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8912
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8928
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8944
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8960
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 8976
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 202; y: 369
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8992
+ hash: "a0814b5ba881e5da8a1ecae8d714b4ce"
+ }
+ Frame {
+ msec: 9008
+ hash: "b34a796f25ad62f952101b296f9c2bac"
+ }
+ Frame {
+ msec: 9024
+ hash: "8cbeb925f039bde9846d37a5ec6cd3f9"
+ }
+ Frame {
+ msec: 9040
+ hash: "c1570ad4cb688ea51818e0a09e349daa"
+ }
+ Frame {
+ msec: 9056
+ hash: "237dd62011f4253970b946b335e3fb71"
+ }
+ Frame {
+ msec: 9072
+ hash: "c5980322acf00a04efbd5e1b92aa0e98"
+ }
+ Frame {
+ msec: 9088
+ hash: "d1372239a681d1fccc25257b4a02fb39"
+ }
+ Frame {
+ msec: 9104
+ hash: "524db6ce45674c777d72f9206415be2f"
+ }
+ Frame {
+ msec: 9120
+ hash: "021bda841eaefa76ce5e1c97150af6f6"
+ }
+ Frame {
+ msec: 9136
+ hash: "ce673b66f695f5b002515a5416bbf913"
+ }
+ Frame {
+ msec: 9152
+ hash: "cc6619c7cd6e4e274df4729aad6cca46"
+ }
+ Frame {
+ msec: 9168
+ hash: "7fb0ed99b7d751d1f335afd7c0de2f2c"
+ }
+ Frame {
+ msec: 9184
+ hash: "3d75735eefbf95f37e2a8605b9167ba1"
+ }
+ Frame {
+ msec: 9200
+ hash: "82f54d7e254edcf499ea12a63118e8a7"
+ }
+ Frame {
+ msec: 9216
+ hash: "8517007d5102af238935e93a3b38087f"
+ }
+ Frame {
+ msec: 9232
+ hash: "dc272fc8fc98d822a154da1d495d4f7e"
+ }
+ Frame {
+ msec: 9248
+ hash: "11120d6de575ffa639b6abb3af4afef7"
+ }
+ Frame {
+ msec: 9264
+ hash: "70e522f64236dfa4e1613ffc29b4b23e"
+ }
+ Frame {
+ msec: 9280
+ hash: "7a5f69a1eecb5de0fc2295cd287eb449"
+ }
+ Frame {
+ msec: 9296
+ hash: "a569789b082296415321ba11c859abe5"
+ }
+ Frame {
+ msec: 9312
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Frame {
+ msec: 9328
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Frame {
+ msec: 9344
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 9360
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 9376
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 9392
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 9408
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 9424
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 9440
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9456
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9472
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9488
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9504
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9520
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9536
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9552
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9568
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9584
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9600
+ image: "mousearea-flickable.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9632
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9648
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9664
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9680
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9696
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9712
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9728
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 9744
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 205; y: 307
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9760
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9776
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9792
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9808
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9824
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9840
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9856
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9872
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9888
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9904
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9920
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9936
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9952
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9968
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 9984
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10000
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10016
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10032
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10048
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10064
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10080
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10096
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10112
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10128
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10144
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10160
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10176
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10192
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10208
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10224
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10240
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10256
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10272
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10288
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10304
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10320
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10336
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10352
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10368
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10384
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10400
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10416
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10432
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10448
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10464
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10480
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10496
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10512
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10528
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10544
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10560
+ image: "mousearea-flickable.10.png"
+ }
+ Frame {
+ msec: 10576
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10592
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10608
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10624
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10640
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10656
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10672
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10688
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10704
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10720
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10736
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10752
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10768
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10784
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10800
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10816
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10832
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10848
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10864
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10880
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10896
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10912
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10928
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10944
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10960
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10976
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 10992
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11008
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11024
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11040
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11056
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11072
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11088
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 308
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11104
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11120
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11136
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 309
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11152
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11168
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Frame {
+ msec: 11184
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 310
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11200
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 311
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11216
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 312
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11232
+ hash: "90cdfe8920f115fd55cde6fdbd95e867"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 313
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 314
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11248
+ hash: "a569789b082296415321ba11c859abe5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 316
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 317
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11264
+ hash: "86b32befe0dada5bdce82a7dd14777ce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 319
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 321
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11280
+ hash: "70e522f64236dfa4e1613ffc29b4b23e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 324
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11296
+ hash: "11120d6de575ffa639b6abb3af4afef7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 326
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 327
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11312
+ hash: "8e05207e0d0d9d15a61a0d21d985a83a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 330
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 332
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11328
+ hash: "6602009ffe3c0f3072640ebc8749b76f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 335
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 337
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11344
+ hash: "8517007d5102af238935e93a3b38087f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 343
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 345
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11360
+ hash: "82f54d7e254edcf499ea12a63118e8a7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 348
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 350
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11376
+ hash: "572cb62d69ccb973ea18d3b0eaff571b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 352
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 355
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11392
+ hash: "79650397b868019909b931a32a115823"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 357
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 359
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11408
+ hash: "43e50f4d4d37373e26af0a5d3cb64c4c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 361
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 363
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11424
+ hash: "a0f8eb8a796f67c368b0a479e8d14681"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 365
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 367
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11440
+ hash: "01bf03313a0229e810a24e2adbbe9775"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 369
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 371
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11456
+ hash: "7fb0ed99b7d751d1f335afd7c0de2f2c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 373
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 375
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11472
+ hash: "363eca81f97f20f14e8d480f83d2bc7d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 379
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11488
+ hash: "6d49fc41fb6d74643c7613df7e417833"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 381
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 383
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11504
+ hash: "806d22bc3533c729cd10dc889c36902d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 385
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 387
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11520
+ image: "mousearea-flickable.11.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 389
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 392
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11536
+ hash: "929bf28dcb97e8c93dae5dbe23beecc8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 394
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 396
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11552
+ hash: "cb49adcd2c8afe27fd5926bd622added"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 398
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 399
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11568
+ hash: "0121c18897c37481fddbac57db636a60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 402
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11584
+ hash: "c0a569ee064d844835dddab11eadcd33"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 404
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 406
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11600
+ hash: "52d45e8dde81fef5ee93bbd5a40d4851"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 407
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 409
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11616
+ hash: "ce673b66f695f5b002515a5416bbf913"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 410
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11632
+ hash: "f334bfcc3af89bf1405762a215c54ea6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 411
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 412
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11648
+ hash: "ee0523fe6a33b59871ad3b311ca0cbeb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 414
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11664
+ hash: "66f71641c7a607152f140428ab9621d6"
+ }
+ Frame {
+ msec: 11680
+ hash: "66f71641c7a607152f140428ab9621d6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 415
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11696
+ hash: "66f71641c7a607152f140428ab9621d6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 416
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11712
+ hash: "ddd3d8cb82e238358cdb16c1df7d27b7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 417
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11728
+ hash: "ddd3d8cb82e238358cdb16c1df7d27b7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 418
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11744
+ hash: "29ca97cc573d3a1fde65320b61678c60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 419
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11760
+ hash: "29ca97cc573d3a1fde65320b61678c60"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 421
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11776
+ hash: "7b41d651ad46341859d0188db341ae10"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 423
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11792
+ hash: "6b236864b7d95bf9f76b8afd6ba78613"
+ }
+ Frame {
+ msec: 11808
+ hash: "6b236864b7d95bf9f76b8afd6ba78613"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 424
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11824
+ hash: "95b57cd3dac3bce56674f2c4143f42d4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 425
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11840
+ hash: "95b57cd3dac3bce56674f2c4143f42d4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 426
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11856
+ hash: "021bda841eaefa76ce5e1c97150af6f6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 428
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11872
+ hash: "b1ea82b880a2fc35bf1ed117d8ab21b0"
+ }
+ Frame {
+ msec: 11888
+ hash: "b1ea82b880a2fc35bf1ed117d8ab21b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 429
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11904
+ hash: "b1ea82b880a2fc35bf1ed117d8ab21b0"
+ }
+ Frame {
+ msec: 11920
+ hash: "b1ea82b880a2fc35bf1ed117d8ab21b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 430
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11936
+ hash: "1709dda08ce7494ff6d082cc5d93f0d2"
+ }
+ Frame {
+ msec: 11952
+ hash: "1709dda08ce7494ff6d082cc5d93f0d2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 431
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11968
+ hash: "1709dda08ce7494ff6d082cc5d93f0d2"
+ }
+ Frame {
+ msec: 11984
+ hash: "1709dda08ce7494ff6d082cc5d93f0d2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 432
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12000
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 433
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12016
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Frame {
+ msec: 12032
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 434
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12048
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12064
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12080
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12096
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12112
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 435
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12128
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12144
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12160
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12176
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12192
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 210; y: 435
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12208
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12224
+ hash: "68c8c95edb8cce11320715266bd62628"
+ }
+ Frame {
+ msec: 12240
+ hash: "80edf52cc9e64a29f677bc2203220ba9"
+ }
+ Frame {
+ msec: 12256
+ hash: "b1ea82b880a2fc35bf1ed117d8ab21b0"
+ }
+ Frame {
+ msec: 12272
+ hash: "6b236864b7d95bf9f76b8afd6ba78613"
+ }
+ Frame {
+ msec: 12288
+ hash: "ddd3d8cb82e238358cdb16c1df7d27b7"
+ }
+ Frame {
+ msec: 12304
+ hash: "ce673b66f695f5b002515a5416bbf913"
+ }
+ Frame {
+ msec: 12320
+ hash: "0121c18897c37481fddbac57db636a60"
+ }
+ Frame {
+ msec: 12336
+ hash: "cc6619c7cd6e4e274df4729aad6cca46"
+ }
+ Frame {
+ msec: 12352
+ hash: "aafb12a520eb443ee1348282f2c54e4a"
+ }
+ Frame {
+ msec: 12368
+ hash: "c37507a29e3a6d80446ad68f2d92f266"
+ }
+ Frame {
+ msec: 12384
+ hash: "6ef4abc294d928381346e8ff9b012475"
+ }
+ Frame {
+ msec: 12400
+ hash: "4e129ebba85d1f3717d09f71eb5a1a7d"
+ }
+ Frame {
+ msec: 12416
+ hash: "6602009ffe3c0f3072640ebc8749b76f"
+ }
+ Frame {
+ msec: 12432
+ hash: "8e05207e0d0d9d15a61a0d21d985a83a"
+ }
+ Frame {
+ msec: 12448
+ hash: "144eeb7c2a32cedb6ebba063501c9176"
+ }
+ Frame {
+ msec: 12464
+ hash: "7a5f69a1eecb5de0fc2295cd287eb449"
+ }
+ Frame {
+ msec: 12480
+ image: "mousearea-flickable.12.png"
+ }
+ Frame {
+ msec: 12496
+ hash: "a569789b082296415321ba11c859abe5"
+ }
+ Frame {
+ msec: 12512
+ hash: "9f9f85d5f879b0e52ebc751d6668cfb8"
+ }
+ Frame {
+ msec: 12528
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 12544
+ hash: "43fc85bb3b1501f5e12f1fedaaa14c64"
+ }
+ Frame {
+ msec: 12560
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 12576
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 12592
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 12608
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 12624
+ hash: "d75a43305e2884759ca41d7b1cbadf52"
+ }
+ Frame {
+ msec: 12640
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12656
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12672
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12688
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12704
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12720
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12736
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12752
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12768
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12784
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12800
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12816
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12832
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12848
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12864
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12880
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12896
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12912
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12928
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12944
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12960
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12976
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 12992
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13008
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13024
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13040
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13056
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13072
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13088
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13104
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13120
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13136
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13152
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13168
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13184
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13200
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13216
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13232
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13248
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13264
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13280
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13296
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13312
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13328
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13344
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13360
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Key {
+ type: 6
+ key: 16777251
+ modifiers: 134217728
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 13376
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13392
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13408
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13424
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13440
+ image: "mousearea-flickable.13.png"
+ }
+ Frame {
+ msec: 13456
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13472
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13488
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+ Frame {
+ msec: 13504
+ hash: "cc1fd2f4c3be318052254a9b6be7a57b"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
index cc374fd..433fd82 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
index 21c46d8..6762645 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
this test shows a blue box being dragged around -- first roughly tracing the
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml
new file mode 100644
index 0000000..a0b787f
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml
@@ -0,0 +1,52 @@
+import Qt 4.7
+
+Rectangle {
+ width: 400; height: 480
+ color: "white"
+
+ Flickable {
+ anchors.fill: parent
+ contentHeight: 100
+
+ Rectangle {
+ id: yellow
+ width: 400; height: 120
+ color: "yellow"
+ MouseArea {
+ anchors.fill: parent
+ onPressedChanged: pressed ? yellow.color = "lightyellow": yellow.color = "yellow"
+ }
+ }
+ Rectangle {
+ id: blue
+ width: 400; height: 120
+ y: 120
+ color: "steelblue"
+ MouseArea {
+ anchors.fill: parent
+ onPressed: blue.color = "lightsteelblue"
+ onReleased: blue.color = "steelblue"
+ }
+ }
+ Rectangle {
+ id: red
+ y: 240
+ width: 400; height: 120
+ color: "red"
+ MouseArea {
+ anchors.fill: parent
+ onEntered: { red.color = "darkred"; tooltip.opacity = 1 }
+ onExited: { red.color = "red"; tooltip.opacity = 0 }
+ }
+ Rectangle {
+ id: tooltip
+ x: 10; y: 20
+ width: 100; height: 50
+ color: "green"
+ opacity: 0
+ }
+ }
+
+ }
+
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
index 3019006..a686188 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
/*
This test displays 6 red rects -- 4 in the top row, 2 in the bottom.
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml
index d766dc6..463edf8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
index fc8261f..1b64376 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml
index b8ff925..54ef858 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
index 8cff5c6..9595a5c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml
index c6d71d5..aed6380 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 450
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
index 0adfa02..3bcab5a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 450
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml
index 7091bb3..4b36e16 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml
index 1eb115d..a4036fe 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml
index f45e9a4..5981b12 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 400; height: 400;
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml
index ff60365..91895c2 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item{
width: 200; height: 600
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml
index 029a2fc..2500ef0 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml
index ee94857..d17233e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 240; color: "gray"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
index 5dee0c6..7ca0ca5 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 240; color: "gray"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
index 0ddcca4..d981763 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: clock
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml
index ffc6a5e..5da471e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml
index fec5428..e7e5b3c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
index 5368349..cabdce7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "#ffffff"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml
index 56d616e..880609b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data/parentanchor.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data/parentanchor.qml
index 56d616e..880609b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data/parentanchor.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data/parentanchor.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml
index 80f0f03..f04aa66 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: s; width: 600; height: 100; color: "lightsteelblue"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml
index 1ccede4..9439f73 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml
index 07ad236..3e34f04 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml
index c2fd0d8..76c2ee1 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml
index cfd832e..d460514 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml
index 0c06196..ee06b1a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml
index 59f17f7..3b8ae0c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml
index c592f18..27fbaf4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml
index fa6b5da..a4bf452 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: childrenRect.width
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml
index ecd9470..1058b04 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 500
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml
index ab6e1533..2b9c85c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 500
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml
index ab17eb1..a39c340 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml
index 72499b9..8529b92 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml
index f4cbcbd..bf3aea6 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml
index 9f396c2..4a87240 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index 90b5411..d948e4a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: s; width: 800; height: 1000; color: "lightsteelblue"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index 0dba47c..d10cfd3 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: s; width: 800; height: 1000; color: "lightsteelblue"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
index 5516fc9..686dd2c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
resources: [
Component { id: cursorA
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml
index 8ee92d7..1241d14 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml
index 84c16e1..f1099c8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml
index 4ff00f4..1f5b365 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml
index 8578d48..ef9ba33 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/qt-669.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/qt-669.qml
index 352c890..5926e04 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/qt-669.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/qt-669.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/wrap.qml
index f96daa9..2e755a4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/wrap.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/wrap.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml
index b01ddf8..277b9fc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
Component { id: testableCursor
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
index b2a0754..abb4464 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
height:400
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml
index 09f16ab..1de2f4f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
resources: [
Component { id: cursorA
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml
index 3b664b6..208d05f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
index b779c21..b5a4837 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml
index e29ac56..a0351e8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml
index 645b447..cdc5153 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml
index df2dd38..a1d998f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.qml
index 873a86d..707734a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.qml
index e29ac56..a0351e8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
index ed8bc2c..5a12e2e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item{
height: 50; width: 200
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml
index 2d65adf..08df173 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item{
width:600;
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml
index 3c00ee6..c4a502e 100644
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml
+++ b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
// The WebView size is determined by the width, height,
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml
index d920a4c..f4c4e29 100644
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml
+++ b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml
index 47999be..273c2b0 100644
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml
+++ b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
index 1d3ec98..0272f84 100644
--- a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
+++ b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: rect
diff --git a/tests/auto/declarative/qmlvisual/rect/MyRect.qml b/tests/auto/declarative/qmlvisual/rect/MyRect.qml
index 22e0948..7a315e8 100644
--- a/tests/auto/declarative/qmlvisual/rect/MyRect.qml
+++ b/tests/auto/declarative/qmlvisual/rect/MyRect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: rect
diff --git a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml
index 52acadf..7c42d13 100644
--- a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml
+++ b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/rect/rect-painting.qml b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml
index 93beeec..6abb03d 100644
--- a/tests/auto/declarative/qmlvisual/rect/rect-painting.qml
+++ b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 900; height: 500
diff --git a/tests/auto/declarative/qmlvisual/repeater/basic1.qml b/tests/auto/declarative/qmlvisual/repeater/basic1.qml
index acb669c..3d31324 100644
--- a/tests/auto/declarative/qmlvisual/repeater/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/basic1.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/repeater/basic2.qml b/tests/auto/declarative/qmlvisual/repeater/basic2.qml
index 3323da5..9cad9eb 100644
--- a/tests/auto/declarative/qmlvisual/repeater/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/basic2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/repeater/basic3.qml b/tests/auto/declarative/qmlvisual/repeater/basic3.qml
index cb57d49..6346412 100644
--- a/tests/auto/declarative/qmlvisual/repeater/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/basic3.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/repeater/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/basic4.qml
index f31de2c..817d438 100644
--- a/tests/auto/declarative/qmlvisual/repeater/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/basic4.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "blue"
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml
index 5bc0d6b..d11a9dd 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml
index 64cf2ea..9b36f60 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml
index 41e174a..9752b72 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml
index fcf2504..8492621 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml
index bf215ca..f9880f8 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml
index cb6b46c..cc980e1 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml
index 9545fa9..e395dde 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml
index 4839206..b0dc6b8 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data/basic1.qml b/tests/auto/declarative/qmlvisual/repeater/data/basic1.qml
index 9535a2c..f0950d7 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data/basic1.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data/basic1.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data/basic2.qml b/tests/auto/declarative/qmlvisual/repeater/data/basic2.qml
index 81bc1f7..fcf3fee 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data/basic2.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data/basic2.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data/basic3.qml b/tests/auto/declarative/qmlvisual/repeater/data/basic3.qml
index 417eaab..8447aca 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data/basic3.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data/basic3.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/repeater/data/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/data/basic4.qml
index 264d825..eeb60fa 100644
--- a/tests/auto/declarative/qmlvisual/repeater/data/basic4.qml
+++ b/tests/auto/declarative/qmlvisual/repeater/data/basic4.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml b/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml
index 3104906..70ee988 100644
--- a/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml
+++ b/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml b/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml
index da7f9b6..cd4dab1 100644
--- a/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml
+++ b/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
property string error: "not pressed"
text: (new Date()).valueOf()
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 681b530..5f25882 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -117,6 +117,9 @@ void tst_qmlvisual::visual_data()
files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
files << QT_TEST_SOURCE_DIR "/fillmode/fillmode.qml";
+ // new tests
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-flickable.qml";
+
//these reliably fail in CI, for unknown reasons
//files << QT_TEST_SOURCE_DIR "/animation/easing/easing.qml";
//files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml b/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml
index 8d38ebe..9664566 100644
--- a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml
+++ b/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml b/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
index 711a747..c569c9a 100644
--- a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
+++ b/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property variant period : 250
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml b/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml
index 5e35306..9e008de 100644
--- a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml
+++ b/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/data/evaluateJavaScript.qml b/tests/auto/declarative/qmlvisual/webview/javascript/data/evaluateJavaScript.qml
index 957f9d5..bfe40da 100644
--- a/tests/auto/declarative/qmlvisual/webview/javascript/data/evaluateJavaScript.qml
+++ b/tests/auto/declarative/qmlvisual/webview/javascript/data/evaluateJavaScript.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/data/windowObjects.qml b/tests/auto/declarative/qmlvisual/webview/javascript/data/windowObjects.qml
index 7fce295..07aa13d 100644
--- a/tests/auto/declarative/qmlvisual/webview/javascript/data/windowObjects.qml
+++ b/tests/auto/declarative/qmlvisual/webview/javascript/data/windowObjects.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
index 6c01382..4a72d7f 100644
--- a/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
+++ b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Column {
diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml b/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml
index 8c52aff..4006b47 100644
--- a/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml
+++ b/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Column {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/data/fontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/data/fontFamily.qml
index 195c3ba..34d1116 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/data/fontFamily.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/data/fontFamily.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/data/fontSize.qml b/tests/auto/declarative/qmlvisual/webview/settings/data/fontSize.qml
index 438ffa5..efe3875 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/data/fontSize.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/data/fontSize.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/data/noAutoLoadImages.qml b/tests/auto/declarative/qmlvisual/webview/settings/data/noAutoLoadImages.qml
index ead5c3b..624a16b 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/data/noAutoLoadImages.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/data/noAutoLoadImages.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/data/setFontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/data/setFontFamily.qml
index cf74d42..414d64f 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/data/setFontFamily.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/data/setFontFamily.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml
index f547b0e..2f68f24 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml b/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml
index 7eaa96b..c017cd9 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Grid {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml b/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml
index 67f1633..4f8d3b2 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Grid {
diff --git a/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml
index 823469f..42220e4 100644
--- a/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml
+++ b/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/data/pageWidth.qml b/tests/auto/declarative/qmlvisual/webview/zooming/data/pageWidth.qml
index 1a993e1..2e60b7f 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/data/pageWidth.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/data/pageWidth.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/data/renderControl.qml b/tests/auto/declarative/qmlvisual/webview/zooming/data/renderControl.qml
index d3c5890..464e009 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/data/renderControl.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/data/renderControl.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/data/resolution.qml b/tests/auto/declarative/qmlvisual/webview/zooming/data/resolution.qml
index 0a2b8db..edf8040 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/data/resolution.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/data/resolution.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/data/zoomTextOnly.qml b/tests/auto/declarative/qmlvisual/webview/zooming/data/zoomTextOnly.qml
index aaa7583..4aab708 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/data/zoomTextOnly.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/data/zoomTextOnly.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/data/zooming.qml b/tests/auto/declarative/qmlvisual/webview/zooming/data/zooming.qml
index ad83800..080d4d0 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/data/zooming.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/data/zooming.qml
@@ -1,4 +1,4 @@
-import Qt.VisualTest 4.6
+import Qt.VisualTest 4.7
VisualTest {
Frame {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml b/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml
index 4a876dd..c9e3c02 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml b/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml
index 52a569e..8174606 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Rectangle {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml b/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml
index d6c35d4..b2638f9 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml
index 741450f..bf7f9ff 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml b/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml
index adbd7a5..5b4dd7a 100644
--- a/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml
+++ b/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
// Note that zooming is better done using zoomFactor and careful
diff --git a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
index 2621d65..b8e317e 100644
--- a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
+++ b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
@@ -111,14 +111,6 @@ void tst_QPacketProtocol::setMaximumPacketSize()
QPacketProtocol out(m_serverConn);
QCOMPARE(out.setMaximumPacketSize(size), expected);
-
- if (size == expected) {
- QPacketProtocol in(m_client);
- QByteArray b;
- b.fill('a', size + 1);
- out.send() << b.constData();
- QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(invalidPacket())));
- }
}
void tst_QPacketProtocol::setMaximumPacketSize_data()
diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp
index 66f04e5..c0c3eca 100644
--- a/tests/auto/declarative/shared/debugutil.cpp
+++ b/tests/auto/declarative/shared/debugutil.cpp
@@ -47,11 +47,11 @@
#include "debugutil_p.h"
-#include <iostream>
bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) {
QEventLoop loop;
QTimer timer;
+ timer.setSingleShot(true);
QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
QObject::connect(receiver, member, &loop, SLOT(quit()));
timer.start(timeout);
@@ -59,25 +59,6 @@ bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member,
return timer.isActive();
}
-
-QDeclarativeDebugTestData::QDeclarativeDebugTestData(QEventLoop *el)
- : exitCode(-1), loop(el)
-{
-}
-
-QDeclarativeDebugTestData::~QDeclarativeDebugTestData()
-{
- qDeleteAll(items);
-}
-
-void QDeclarativeDebugTestData::testsFinished(int code)
-{
- exitCode = code;
- loop->quit();
-}
-
-
-
QDeclarativeDebugTestService::QDeclarativeDebugTestService(const QString &s, QObject *parent)
: QDeclarativeDebugService(s, parent), enabled(false)
{
@@ -117,63 +98,3 @@ void QDeclarativeDebugTestClient::messageReceived(const QByteArray &ba)
emit serverMessage(ba);
}
-
-tst_QDeclarativeDebug_Thread::tst_QDeclarativeDebug_Thread(QDeclarativeDebugTestData *data, QDeclarativeTestFactory *factory)
- : m_data(data), m_factory(factory)
-{
-}
-
-void tst_QDeclarativeDebug_Thread::run()
-{
- bool ok = false;
-
- QDeclarativeDebugConnection conn;
- conn.connectToHost("127.0.0.1", 3768);
- ok = conn.waitForConnected();
- Q_ASSERT(ok);
-
- QEventLoop loop;
- connect(m_data, SIGNAL(engineCreated()), &loop, SLOT(quit()));
- loop.exec();
-
- m_data->conn = &conn;
-
- Q_ASSERT(m_factory);
- QObject *test = m_factory->createTest(m_data);
- Q_ASSERT(test);
- int code = QTest::qExec(test, QCoreApplication::arguments());
- delete test;
- emit testsFinished(code);
-}
-
-int QDeclarativeDebugTest::runTests(QDeclarativeTestFactory *factory, const QList<QByteArray> &qml)
-{
- qputenv("QML_DEBUG_SERVER_PORT", "3768");
-
- QEventLoop loop;
- QDeclarativeDebugTestData data(&loop);
-
- tst_QDeclarativeDebug_Thread thread(&data, factory);
- QObject::connect(&thread, SIGNAL(testsFinished(int)), &data, SLOT(testsFinished(int)));
-
- QDeclarativeDebugService::notifyOnServerStart(&thread, "start");
-
- QDeclarativeEngine engine; // blocks until client connects
-
- foreach (const QByteArray &code, qml) {
- QDeclarativeComponent c(&engine);
- c.setData(code, QUrl::fromLocalFile(""));
- Q_ASSERT(c.isReady()); // fails if bad syntax
- data.items << qobject_cast<QDeclarativeItem*>(c.create());
- }
-
- // start the test
- data.engine = &engine;
- emit data.engineCreated();
-
- loop.exec();
- thread.wait();
-
- return data.exitCode;
-}
-
diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h
index c152b5a..e6bb7ad 100644
--- a/tests/auto/declarative/shared/debugutil_p.h
+++ b/tests/auto/declarative/shared/debugutil_p.h
@@ -51,50 +51,10 @@
#include <private/qdeclarativedebugservice_p.h>
#include <private/qdeclarativeitem_p.h>
-class QDeclarativeTestFactory;
-
class QDeclarativeDebugTest
{
public:
static bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
-
- static int runTests(QDeclarativeTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
-};
-
-class QDeclarativeDebugTestData : public QObject
-{
- Q_OBJECT
-public:
- QDeclarativeDebugTestData(QEventLoop *el);
-
- ~QDeclarativeDebugTestData();
-
- QDeclarativeDebugConnection *conn;
- QDeclarativeEngine *engine;
-
- int exitCode;
- QEventLoop *loop;
-
- QList<QDeclarativeItem *> items;
-
-signals:
- void engineCreated();
-
-public slots:
- void testsFinished(int code);
-
-private:
- friend class QDeclarativeDebugTest;
-};
-
-
-class QDeclarativeTestFactory
-{
-public:
- QDeclarativeTestFactory() {}
- virtual ~QDeclarativeTestFactory() {}
-
- virtual QObject *createTest(QDeclarativeDebugTestData *data) = 0;
};
class QDeclarativeDebugTestService : public QDeclarativeDebugService
@@ -131,20 +91,4 @@ private:
QByteArray lastMsg;
};
-class tst_QDeclarativeDebug_Thread : public QThread
-{
- Q_OBJECT
-public:
- tst_QDeclarativeDebug_Thread(QDeclarativeDebugTestData *data, QDeclarativeTestFactory *factory);
-
- void run();
-
-signals:
- void testsFinished(int);
-
-private:
- QDeclarativeDebugTestData *m_data;
- QDeclarativeTestFactory *m_factory;
-};
-
diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/declarative/creation/data/item.qml
index 74d2f27..bc6adfb 100644
--- a/tests/benchmarks/declarative/creation/data/item.qml
+++ b/tests/benchmarks/declarative/creation/data/item.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Item {}
diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/declarative/creation/data/qobject.qml
index 99d010f..61e6146 100644
--- a/tests/benchmarks/declarative/creation/data/qobject.qml
+++ b/tests/benchmarks/declarative/creation/data/qobject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
}
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp
index 7aec32a..6f00473 100644
--- a/tests/benchmarks/declarative/creation/tst_creation.cpp
+++ b/tests/benchmarks/declarative/creation/tst_creation.cpp
@@ -127,7 +127,7 @@ void tst_creation::qobject_cpp()
void tst_creation::qobject_qml()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nQtObject {}", QUrl());
+ component.setData("import Qt 4.7\nQtObject {}", QUrl());
QObject *obj = component.create();
delete obj;
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
index 0d2d49b..45e418d 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
QtObject {}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
index dc29f15..43ce916 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
id: blah
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
index 9b88b53..db43182 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Item { id:block
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
index 972f405..6ff2546 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
index d08f35b..0275e21 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property int a
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
index 11b95e1..565a8ee 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
@@ -1,3 +1,3 @@
-import Qt 4.6
+import Qt 4.7
Item {}
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
index a923a0a..b0b4e99 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property int blah
diff --git a/tests/benchmarks/declarative/qmltime/example.qml b/tests/benchmarks/declarative/qmltime/example.qml
index 68889f0..dde0671 100644
--- a/tests/benchmarks/declarative/qmltime/example.qml
+++ b/tests/benchmarks/declarative/qmltime/example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
index 31c879b..a383fc7 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
index 23fe78e..209b572 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
index bc447ef..c2e08c7 100644
--- a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
index c1cdb68..f117e83 100644
--- a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
index 3db9f08..faf93d0 100644
--- a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
index 996602c..c9bd866 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
index 9f79c34..6626d78 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
index f228c2a..8c72288 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
index 335aeb8..e2c05d6 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
index 6f8d849..e31d46d 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
Rectangle {}
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
index 65d5010..6496223 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
index 2dfe922..b699459 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
index 1fa0d3b..bce30b7 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
index 33bb91c..6a2b19d 100644
--- a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
index 97bad47..9ca67b7 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
index 36dda15..d213a51 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
index 396e27d..8878450 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
index a31af5a..7144abf 100644
--- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
index 007d12a..84cf735 100644
--- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import QmlTime 1.0 as QmlTime
Item {
diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/declarative/script/data/CustomObject.qml
index 22b7be7..ae02117 100644
--- a/tests/benchmarks/declarative/script/data/CustomObject.qml
+++ b/tests/benchmarks/declarative/script/data/CustomObject.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
QtObject {
property real prop1: 0
diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/declarative/script/data/block.qml
index bb03d8d..1376492 100644
--- a/tests/benchmarks/declarative/script/data/block.qml
+++ b/tests/benchmarks/declarative/script/data/block.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 200; height: 200
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 6884781..13678af 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -492,7 +492,7 @@ const FunctionNode *CppCodeParser::findFunctionNode(const QString& synopsis,
candidates << overload;
}
-
+
/*
There are several functions with the correct
parameter count, but only one has the correct
@@ -545,7 +545,7 @@ QSet<QString> CppCodeParser::topicCommands()
}
/*!
- Process the topic \a command in context \a doc with argument \a arg.
+ Process the topic \a command in context \a doc with argument \a arg.
*/
Node *CppCodeParser::processTopicCommand(const Doc& doc,
const QString& command,
@@ -731,7 +731,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
-#if 0
+#if 0
QStringList parts = arg.split(" ");
qDebug() << command << parts;
if (parts.size() > 1) {
@@ -741,7 +741,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return new QmlBasicTypeNode(pageNode, parts[0]);
}
}
-#endif
+#endif
return new QmlBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
@@ -912,13 +912,13 @@ QSet<QString> CppCodeParser::otherMetaCommands()
<< COMMAND_NEXTPAGE
<< COMMAND_PREVIOUSPAGE
<< COMMAND_INDEXPAGE
-#ifdef QDOC_QML
+#ifdef QDOC_QML
<< COMMAND_STARTPAGE
<< COMMAND_QMLINHERITS
<< COMMAND_QMLDEFAULT;
-#else
+#else
<< COMMAND_STARTPAGE;
-#endif
+#endif
}
/*!
@@ -2119,7 +2119,7 @@ bool CppCodeParser::matchDocsAndStuff()
}
++a;
}
-#endif
+#endif
}
NodeList::Iterator n = nodes.begin();
@@ -2268,18 +2268,15 @@ void CppCodeParser::instantiateIteratorMacro(const QString &container,
void CppCodeParser::createExampleFileNodes(FakeNode *fake)
{
QString examplePath = fake->name();
-
- // we can assume that this file always exists
- QString proFileName = examplePath + "/" +
- examplePath.split("/").last() + ".pro";
-
+ QString proFileName = examplePath + "/" + examplePath.split("/").last() + ".pro";
QString userFriendlyFilePath;
+
QString fullPath = Config::findFile(fake->doc().location(),
exampleFiles,
exampleDirs,
proFileName,
userFriendlyFilePath);
-
+
if (fullPath.isEmpty()) {
QString tmp = proFileName;
proFileName = examplePath + "/" + "qbuild.pro";
@@ -2290,9 +2287,18 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
proFileName,
userFriendlyFilePath);
if (fullPath.isEmpty()) {
- fake->doc().location().warning(
- tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
- return;
+ proFileName = examplePath + "/" + examplePath.split("/").last() + ".qmlproject";
+ userFriendlyFilePath.clear();
+ fullPath = Config::findFile(fake->doc().location(),
+ exampleFiles,
+ exampleDirs,
+ proFileName,
+ userFriendlyFilePath);
+ if (fullPath.isEmpty()) {
+ fake->doc().location().warning(
+ tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ return;
+ }
}
}
@@ -2315,14 +2321,14 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
i.remove();
}
else if (fileName.contains("/qrc_") || fileName.contains("/moc_")
- || fileName.contains("/ui_"))
+ || fileName.contains("/ui_"))
i.remove();
}
if (!mainCpp.isEmpty())
exampleFiles.append(mainCpp);
// add any qmake Qt resource files and qmake project files
- exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro");
+ exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro qmldir");
}
foreach (const QString &exampleFile, exampleFiles)
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index bf2f724..9a5ffca 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4311,7 +4311,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<tr><td>";
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
- out() << "<span class=\"qmlreadonly\">read-only</span>";
+ out() << "<span class=\"qmlreadonly\">read-only&nbsp;</span>";
+ if (qpgn->isDefault())
+ out() << "<span class=\"qmldefault\">default&nbsp;</span>";
generateQmlItem(qpn, relative, marker, false);
out() << "</td></tr>";
if (qpgn->isDefault()) {
diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml
index 8882d5a..0912f58 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/content/Browser.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: root
diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp
new file mode 100644
index 0000000..015d1b0
--- /dev/null
+++ b/tools/qml/loggerwidget.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "loggerwidget.h"
+#include <qglobal.h>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+LoggerWidget::LoggerWidget(QWidget *parent) :
+ QPlainTextEdit(parent),
+ m_keepClosed(false)
+{
+ setAttribute(Qt::WA_QuitOnClose, false);
+ setWindowTitle(tr("Qt Declarative UI Viewer - Logger"));
+}
+
+void LoggerWidget::append(const QString &msg)
+{
+ appendPlainText(msg);
+
+ if (!m_keepClosed && !isVisible())
+ setVisible(true);
+}
+
+void LoggerWidget::closeEvent(QCloseEvent *event)
+{
+ m_keepClosed = true;
+ QWidget::closeEvent(event);
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h
new file mode 100644
index 0000000..5c4a701
--- /dev/null
+++ b/tools/qml/loggerwidget.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LOGGERWIDGET_H
+#define LOGGERWIDGET_H
+
+#include <QPlainTextEdit>
+
+QT_BEGIN_NAMESPACE
+
+class LoggerWidget : public QPlainTextEdit {
+Q_OBJECT
+public:
+ LoggerWidget(QWidget *parent=0);
+public slots:
+ void append(const QString &msg);
+protected:
+ void closeEvent(QCloseEvent *event);
+private:
+ bool m_keepClosed;
+};
+
+QT_END_NAMESPACE
+
+#endif // LOGGERWIDGET_H
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 45c2b85..cba5650 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -42,16 +42,20 @@
#include "qdeclarative.h"
#include "qmlruntime.h"
#include "qdeclarativeengine.h"
+#include "loggerwidget.h"
#include <QWidget>
#include <QDir>
#include <QApplication>
#include <QTranslator>
#include <QDebug>
+#include <QMessageBox>
#include "qdeclarativetester.h"
#include "qdeclarativefolderlistmodel.h"
QT_USE_NAMESPACE
+QtMsgHandler systemMsgOutput;
+
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
#include <sys/types.h>
@@ -73,6 +77,36 @@ void myMessageOutput(QtMsgType type, const char *msg)
abort();
}
}
+
+#else // !defined (Q_OS_SYMBIAN)
+
+QWeakPointer<LoggerWidget> logger;
+
+QString warnings;
+void showWarnings()
+{
+ if (!warnings.isEmpty()) {
+ QMessageBox::warning(0, QApplication::tr("Qt Declarative UI Runtime"), warnings);
+ }
+}
+
+void myMessageOutput(QtMsgType type, const char *msg)
+{
+ if (!logger.isNull()) {
+ QString strMsg = QString::fromAscii(msg);
+ QMetaObject::invokeMethod(logger.data(), "append", Q_ARG(QString, strMsg));
+ } else {
+ warnings += msg;
+ warnings += QLatin1Char('\n');
+ }
+ if (systemMsgOutput) { // Windows
+ systemMsgOutput(type, msg);
+ } else { // Unix
+ fprintf(stderr, "%s\n",msg);
+ fflush(stderr);
+ }
+}
+
#endif
void usage()
@@ -88,7 +122,10 @@ void usage()
qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
qWarning(" \"list\" for a list of built-ins");
qWarning(" -resizeview .............................. resize the view, not the skin");
+ qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content");
+ qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view");
qWarning(" -qmlbrowser .............................. use a QML-based file browser");
+ qWarning(" -nolog ................................... do not show log window");
qWarning(" -recordfile <output> ..................... set video recording file");
qWarning(" - ImageMagick 'convert' for GIF)");
qWarning(" - png file for raw frames");
@@ -135,6 +172,14 @@ int main(int argc, char ** argv)
{
#if defined (Q_OS_SYMBIAN)
qInstallMsgHandler(myMessageOutput);
+#else
+ systemMsgOutput = qInstallMsgHandler(myMessageOutput);
+#endif
+
+#if defined (Q_OS_WIN)
+ // Debugging output is not visible by default on Windows -
+ // therefore show modal dialog with errors instad.
+ atexit(showWarnings);
#endif
#if defined (Q_WS_X11)
@@ -184,6 +229,8 @@ int main(int argc, char ** argv)
bool stayOnTop = false;
bool maximized = false;
bool useNativeFileBrowser = true;
+ bool showLogWidget = true;
+ bool sizeToView = true;
#if defined(Q_OS_SYMBIAN)
maximized = true;
@@ -234,8 +281,8 @@ int main(int argc, char ** argv)
if (lastArg) usage();
app.setStartDragDistance(QString(argv[++i]).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
- fprintf(stderr, "Qt Declarative UI Viewer version %s\n", QT_VERSION_STR);
- return 0;
+ qWarning("Qt Declarative UI Viewer version %s", QT_VERSION_STR);
+ exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();
translationFile = argv[++i];
@@ -243,14 +290,16 @@ int main(int argc, char ** argv)
useGL = true;
} else if (arg == "-qmlbrowser") {
useNativeFileBrowser = false;
+ } else if (arg == "-nolog") {
+ showLogWidget = false;
} else if (arg == "-I" || arg == "-L") {
if (arg == "-L")
- fprintf(stderr, "-L option provided for compatibility only, use -I instead\n");
+ qWarning("-L option provided for compatibility only, use -I instead");
if (lastArg) {
QDeclarativeEngine tmpEngine;
QString paths = tmpEngine.importPathList().join(QLatin1String(":"));
- fprintf(stderr, "Current search path: %s\n", paths.toLocal8Bit().constData());
- return 0;
+ qWarning("Current search path: %s", paths.toLocal8Bit().constData());
+ exit(0);
}
imports << QString(argv[++i]);
} else if (arg == "-P") {
@@ -270,6 +319,10 @@ int main(int argc, char ** argv)
if (lastArg) usage();
script = QString(argv[++i]);
runScript = true;
+ } else if (arg == "-sizeviewtorootobject") {
+ sizeToView = false;
+ } else if (arg == "-sizerootobjecttoview") {
+ sizeToView = true;
} else if (arg[0] != '-') {
fileName = arg;
} else if (1 || arg == "-help") {
@@ -287,7 +340,14 @@ int main(int argc, char ** argv)
if (stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
- QDeclarativeViewer viewer(0, wflags);
+#if !defined(Q_OS_SYMBIAN)
+ LoggerWidget loggerWidget(0);
+ if (showLogWidget) {
+ logger = &loggerWidget;
+ }
+#endif
+
+ QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
if (!scriptopts.isEmpty()) {
QStringList options =
scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
@@ -323,44 +383,45 @@ int main(int argc, char ** argv)
if (!(scriptOptions & QDeclarativeViewer::Record) && !(scriptOptions & QDeclarativeViewer::Play))
scriptOptsUsage();
- viewer.setScriptOptions(scriptOptions);
- viewer.setScript(script);
+ viewer->setScriptOptions(scriptOptions);
+ viewer->setScript(script);
} else if (!script.isEmpty()) {
usage();
}
- viewer.addLibraryPath(QCoreApplication::applicationDirPath());
+ viewer->addLibraryPath(QCoreApplication::applicationDirPath());
foreach (QString lib, imports)
- viewer.addLibraryPath(lib);
+ viewer->addLibraryPath(lib);
foreach (QString plugin, plugins)
- viewer.addPluginPath(plugin);
+ viewer->addPluginPath(plugin);
- viewer.setNetworkCacheSize(cache);
- viewer.setRecordFile(recordfile);
+ viewer->setNetworkCacheSize(cache);
+ viewer->setRecordFile(recordfile);
+ viewer->setSizeToView(sizeToView);
if (resizeview)
- viewer.setScaleView();
+ viewer->setScaleView();
if (fps>0)
- viewer.setRecordRate(fps);
+ viewer->setRecordRate(fps);
if (autorecord_to)
- viewer.setAutoRecord(autorecord_from,autorecord_to);
+ viewer->setAutoRecord(autorecord_from,autorecord_to);
if (!skin.isEmpty()) {
if (skin == "list") {
- foreach (QString s, viewer.builtinSkins())
+ foreach (QString s, viewer->builtinSkins())
qWarning() << qPrintable(s);
exit(0);
} else {
- viewer.setSkin(skin);
+ viewer->setSkin(skin);
}
}
if (devkeys)
- viewer.setDeviceKeys(true);
- viewer.setRecordDither(dither);
+ viewer->setDeviceKeys(true);
+ viewer->setRecordDither(dither);
if (recordargs.count())
- viewer.setRecordArgs(recordargs);
+ viewer->setRecordArgs(recordargs);
- viewer.setUseNativeFileBrowser(useNativeFileBrowser);
+ viewer->setUseNativeFileBrowser(useNativeFileBrowser);
if (fullScreen && maximized)
qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen.";
@@ -379,17 +440,19 @@ int main(int argc, char ** argv)
}
if (!fileName.isEmpty()) {
- viewer.open(fileName);
- fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
+ viewer->open(fileName);
+ fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
} else {
if (!useNativeFileBrowser)
- viewer.openFile();
- fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
+ viewer->openFile();
+ fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
if (useNativeFileBrowser)
- viewer.openFile();
+ viewer->openFile();
}
- viewer.setUseGL(useGL);
- viewer.raise();
+ viewer->setUseGL(useGL);
+ viewer->raise();
- return app.exec();
+ int rv = app.exec();
+ delete viewer;
+ exit(rv);
}
diff --git a/tools/qml/qdeclarativefolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp
index d36033d..5a9d88b 100644
--- a/tools/qml/qdeclarativefolderlistmodel.cpp
+++ b/tools/qml/qdeclarativefolderlistmodel.cpp
@@ -413,7 +413,7 @@ void QDeclarativeFolderListModel::setShowOnlyReadable(bool on)
void QDeclarativeFolderListModel::registerTypes()
{
- qmlRegisterType<QDeclarativeFolderListModel>("Qt",4,6,"FolderListModel");
+ qmlRegisterType<QDeclarativeFolderListModel>("Qt",4,7,"FolderListModel");
}
QT_END_NAMESPACE
diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp
index 11fa22f..9864df6 100644
--- a/tools/qml/qdeclarativetester.cpp
+++ b/tools/qml/qdeclarativetester.cpp
@@ -181,7 +181,7 @@ void QDeclarativeTester::save()
file.open(QIODevice::WriteOnly);
QTextStream ts(&file);
- ts << "import Qt.VisualTest 4.6\n\n";
+ ts << "import Qt.VisualTest 4.7\n\n";
ts << "VisualTest {\n";
int imgCount = 0;
@@ -251,7 +251,8 @@ void QDeclarativeTester::updateCurrentTime(int msec)
m_view->render(&p);
}
- bool snapshot = msec == 16 && options & QDeclarativeViewer::Snapshot;
+ bool snapshot = msec == 16 && (options & QDeclarativeViewer::Snapshot
+ || (testscript && testscript->count() == 2));
FrameEvent fe;
fe.msec = msec;
@@ -397,10 +398,10 @@ void QDeclarativeTester::updateCurrentTime(int msec)
void QDeclarativeTester::registerTypes()
{
- qmlRegisterType<QDeclarativeVisualTest>("Qt.VisualTest", 4,6, "VisualTest");
- qmlRegisterType<QDeclarativeVisualTestFrame>("Qt.VisualTest", 4,6, "Frame");
- qmlRegisterType<QDeclarativeVisualTestMouse>("Qt.VisualTest", 4,6, "Mouse");
- qmlRegisterType<QDeclarativeVisualTestKey>("Qt.VisualTest", 4,6, "Key");
+ qmlRegisterType<QDeclarativeVisualTest>("Qt.VisualTest", 4,7, "VisualTest");
+ qmlRegisterType<QDeclarativeVisualTestFrame>("Qt.VisualTest", 4,7, "Frame");
+ qmlRegisterType<QDeclarativeVisualTestMouse>("Qt.VisualTest", 4,7, "Mouse");
+ qmlRegisterType<QDeclarativeVisualTestKey>("Qt.VisualTest", 4,7, "Key");
}
QT_END_NAMESPACE
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index c48e919..d343c76 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -10,11 +10,13 @@ HEADERS += $$PWD/qmlruntime.h \
$$PWD/proxysettings.h \
$$PWD/qdeclarativetester.h \
$$PWD/deviceorientation.h \
- $$PWD/qdeclarativefolderlistmodel.h
+ $$PWD/qdeclarativefolderlistmodel.h \
+ $$PWD/loggerwidget.h
SOURCES += $$PWD/qmlruntime.cpp \
$$PWD/proxysettings.cpp \
$$PWD/qdeclarativetester.cpp \
- $$PWD/qdeclarativefolderlistmodel.cpp
+ $$PWD/qdeclarativefolderlistmodel.cpp \
+ $$PWD/loggerwidget.cpp
RESOURCES = $$PWD/qmlruntime.qrc
maemo5 {
@@ -26,4 +28,3 @@ FORMS = $$PWD/recopts.ui \
$$PWD/proxysettings.ui
include(../shared/deviceskin/deviceskin.pri)
-
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 53409c1..87a4d21 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -496,7 +496,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
canvas = new QDeclarativeView(this);
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
- canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
+
canvas->setFocus();
QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));
@@ -519,7 +519,6 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
#else
setCentralWidget(canvas);
#endif
-
namFactory = new NetworkAccessManagerFactory;
canvas->engine()->setNetworkAccessManagerFactory(namFactory);
@@ -753,10 +752,11 @@ void QDeclarativeViewer::setScaleSkin()
if (scaleSkin)
return;
scaleSkin = true;
- canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
if (skin) {
- canvas->setFixedSize(canvas->sizeHint());
- skin->setScreenSize(canvas->sizeHint());
+ canvas->resize(initialSize);
+ canvas->setFixedSize(initialSize);
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+ updateSizeHints();
}
}
@@ -766,11 +766,8 @@ void QDeclarativeViewer::setScaleView()
return;
scaleSkin = false;
if (skin) {
- canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
- canvas->setMinimumSize(QSize(0,0));
- canvas->setMaximumSize(QSize(16777215,16777215));
- canvas->resize(skin->standardScreenSize());
- skin->setScreenSize(skin->standardScreenSize());
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ updateSizeHints();
}
}
@@ -916,19 +913,12 @@ void QDeclarativeViewer::statusChanged()
tester->executefailure();
if (canvas->status() == QDeclarativeView::Ready) {
- if (!skin) {
- canvas->updateGeometry();
- if (mb)
- mb->updateGeometry();
- if (!isFullScreen() && !isMaximized())
- resize(sizeHint());
- } else {
- if (scaleSkin)
- canvas->resize(canvas->sizeHint());
- else {
- canvas->setFixedSize(skin->standardScreenSize());
- canvas->resize(skin->standardScreenSize());
- }
+ initialSize = canvas->sizeHint();
+ if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
+ QSize newWindowSize = initialSize;
+ newWindowSize.setHeight(newWindowSize.height()+menuBar()->height());
+ updateSizeHints();
+ resize(newWindowSize);
}
}
}
@@ -1011,8 +1001,6 @@ bool QDeclarativeViewer::open(const QString& file_or_url)
canvas->setSource(url);
- qWarning() << "Wall startup time:" << t.elapsed();
-
return true;
}
@@ -1056,41 +1044,43 @@ void QDeclarativeViewer::setSkin(const QString& skinDirOrName)
skin->deleteLater();
}
- canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
-
DeviceSkinParameters parameters;
if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) {
layout()->setEnabled(false);
- //setMenuBar(0);
if (mb)
mb->hide();
if (!err.isEmpty())
qWarning() << err;
skin = new PreviewDeviceSkin(parameters,this);
- canvas->resize(canvas->sizeHint());
if (scaleSkin)
skin->setPreviewAndScale(canvas);
else
skin->setPreview(canvas);
createMenu(0,skin->menu);
+ if (scaleSkin) {
+ canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
+ }
+ updateSizeHints();
skin->show();
- } else {
+ } else if (skin) {
skin = 0;
clearMask();
menuBar()->clear();
- canvas->setParent(this, Qt::SubWindow);
createMenu(menuBar(),0);
- mb->show();
- setMinimumSize(QSize(0,0));
- setMaximumSize(QSize(16777215,16777215));
- canvas->setMinimumSize(QSize(0,0));
- canvas->setMaximumSize(QSize(16777215,16777215));
- QRect g = geometry();
- g.setSize(sizeHint());
+ canvas->setParent(this, Qt::SubWindow);
setParent(0,windowFlags()); // recreate
- canvas->move(0,menuBar()->sizeHint().height());
- setGeometry(g);
+ mb->show();
+ canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ updateSizeHints();
+
layout()->setEnabled(true);
+ if (!scaleSkin) {
+ canvas->resize(initialSize);
+ canvas->setFixedSize(initialSize);
+ }
+ QSize newWindowSize = canvas->size();
+ newWindowSize.setHeight(newWindowSize.height()+menuBar()->height());
+ resize(newWindowSize);
show();
}
canvas->show();
@@ -1122,9 +1112,10 @@ void QDeclarativeViewer::setRecordRate(int fps)
void QDeclarativeViewer::sceneResized(QSize size)
{
if (size.width() > 0 && size.height() > 0) {
- if (skin && scaleSkin)
- skin->setScreenSize(size);
- }
+ if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
+ updateSizeHints();
+ }
+ }
}
void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
@@ -1397,13 +1388,49 @@ void QDeclarativeViewer::setUseNativeFileBrowser(bool use)
useQmlFileBrowser = !use;
}
+void QDeclarativeViewer::setSizeToView(bool sizeToView)
+{
+ QDeclarativeView::ResizeMode resizeMode = sizeToView ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject;
+ if (resizeMode != canvas->resizeMode()) {
+ canvas->setResizeMode(resizeMode);
+ updateSizeHints();
+ }
+}
+
+void QDeclarativeViewer::updateSizeHints()
+{
+ if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
+ QSize newWindowSize = canvas->sizeHint();
+ if (!skin) {
+ newWindowSize.setHeight(newWindowSize.height()+menuBar()->height());
+ }
+ if (!isFullScreen() && !isMaximized()) {
+ resize(newWindowSize);
+ setFixedSize(newWindowSize);
+ if (skin && scaleSkin) {
+ skin->setScreenSize(newWindowSize);
+ }
+ }
+ } else { // QDeclarativeView::SizeRootObjectToView
+ canvas->setMinimumSize(QSize(0,0));
+ canvas->setMaximumSize(QSize(16777215,16777215));
+ setMinimumSize(QSize(0,0));
+ setMaximumSize(QSize(16777215,16777215));
+ if (skin && !scaleSkin) {
+ canvas->setFixedSize(skin->standardScreenSize());
+ skin->setScreenSize(skin->standardScreenSize());
+ }
+ }
+ updateGeometry();
+}
+
void QDeclarativeViewer::registerTypes()
{
static bool registered = false;
if (!registered) {
// registering only for exposing the DeviceOrientation::Orientation enum
- qmlRegisterUncreatableType<DeviceOrientation>("Qt",4,6,"Orientation");
+ qmlRegisterUncreatableType<DeviceOrientation>("Qt",4,6,"Orientation","");
registered = true;
}
}
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 2089dda..a00a703 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -100,7 +100,8 @@ public:
void addPluginPath(const QString& plugin);
void setUseGL(bool use);
void setUseNativeFileBrowser(bool);
-
+ void updateSizeHints();
+ void setSizeToView(bool sizeToView);
QStringList builtinSkins() const;
QMenuBar *menuBar() const;
@@ -149,6 +150,7 @@ private:
PreviewDeviceSkin *skin;
QSize skinscreensize;
QDeclarativeView *canvas;
+ QSize initialSize;
QString currentFileOrUrl;
QDeclarativeTimer recordTimer;
QString frame_fmt;